Skip to content

Instantly share code, notes, and snippets.

package main
import (
"net"
"os"
)
func main() {
strEcho := "Halo"
servAddr := "localhost:6666"
tcpAddr, err := net.ResolveTCPAddr("tcp", servAddr)
@simonhamp
simonhamp / AppServiceProvider.php
Last active May 4, 2024 04:21
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()
@ihoneymon
ihoneymon / how-to-write-by-markdown.md
Last active May 4, 2024 04:19
마크다운(Markdown) 사용법

[공통] 마크다운 markdown 작성법

영어지만, 조금 더 상세하게 마크다운 사용법을 안내하고 있는
"Markdown Guide (https://www.markdownguide.org/)" 를 보시는 것을 추천합니다. ^^

아, 그리고 마크다운만으로 표현이 부족하다고 느끼신다면, HTML 태그를 활용하시는 것도 좋습니다.

1. 마크다운에 관하여

@ih2502mk
ih2502mk / list.md
Last active May 4, 2024 04:16
Quantopian Lectures Saved
@piyushgarg-dev
piyushgarg-dev / README.md
Last active May 4, 2024 04:14
Kafka Crash Course
@m-radzikowski
m-radzikowski / script-template.sh
Last active May 4, 2024 04:13
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@alexpchin
alexpchin / Add_Existing_Project_To_Git.md
Created June 1, 2014 20:14
Add Existing Project To Git Repo

#Adding an existing project to GitHub using the command line

Simple steps to add existing project to Github.

1. Create a new repository on GitHub.

In Terminal, change the current working directory to your local project.

##2. Initialize the local directory as a Git repository.

git init
@kinlane
kinlane / cities.json
Created April 3, 2020 06:37
cities.json
[
{
"city": "New York",
"rank": 1,
"state": "New York"
},
{
"city": "Los Angeles",
"rank": 2,
"state": "California"
@pb111
pb111 / Decision-Tree Classification with Python and Scikit-Learn.ipynb
Created May 25, 2019 05:50
Decision-Tree Classification with Python and Scikit-Learn
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eatonphil
eatonphil / btree.py
Created August 27, 2023 16:47
Python In-memory B-Tree
import math
import uuid
class BTree:
def __init__(self, order=3):
self.root = BTreeNode(order)
def insert(self, toinsert):
all_elements = self.list()