Skip to content

Instantly share code, notes, and snippets.

@Hailong
Hailong / iterm2-solarized.md
Created December 23, 2021 20:59 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@Hailong
Hailong / a-server.go
Created November 15, 2021 23:22 — forked from vomnes/a-server.go
Minimalist TCP server/client in Go using only syscalls - Select() to handle file descriptors
package main
import (
"fmt"
"log"
"golang.org/x/sys/unix"
)
// https://www.gnu.org/software/libc/manual/html_node/Sockets.html#Sockets
@Hailong
Hailong / README.md
Last active November 24, 2020 18:23 — forked from roachhd/README.md
Basics of BrainFuck

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BrainFuck Programming Tutorial by: Katie

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

INTRODUCTION

// by Erik Wrenholt
import java.util.*;
class Mandelbrot
{
static int BAILOUT = 16;
static int MAX_ITERATIONS = 1000;
private static int iterate(float x, float y)
{
@Hailong
Hailong / robots.txt
Created September 5, 2019 17:14 — forked from hn-support/robots.txt
Magento 2 recommended additions for robots.txt
User-agent: *
# Directories
Disallow: /app/
Disallow: /bin/
Disallow: /dev/
Disallow: /lib/
Disallow: /phpserver/
Disallow: /pkginfo/
Disallow: /report/
@Hailong
Hailong / my.cnf
Created June 29, 2019 01:47 — forked from kenelliott/my.cnf
16CPU / 16GB My.cnf
[mysqld_safe]
nice = -15
[mysqld]
max_binlog_size = 256M #max size for binlog before rolling
expire_logs_days = 1 #binlog files older than this will be purged
## Per-Thread Buffers * (max_connections) = total per-thread mem usage
thread_stack = 256K #default: 32bit: 192K, 64bit: 256K
sort_buffer_size = 1M #default: 2M, larger may cause perf issues
@Hailong
Hailong / 000 - Magento .gitignore
Created December 11, 2018 03:27 — forked from dfelton/000 - Magento .gitignore
.gitignore for Magento 1.9 projects
##
# Magento stuff.
##
downloader/.cache/*
downloader/cache.cfg
downloader/connect.cfg
maintenance.flag
media/*
media/**
var/*
@Hailong
Hailong / gist:2f0b4dfc983dab2b73358716eb7d1220
Created September 6, 2017 18:34 — forked from elebescond/gist:1433137
Generate a pot template from a wordpress theme - xgettext
find . -iname "*.php" > /tmp/my_theme_file_list.txt
# new template
xgettext --from-code=utf-8 -d my_theme -f /tmp/my_theme_file_list.txt --keyword=__ -o languages/my_theme.pot
# update template
xgettext --from-code=utf-8 -d my_theme -j -f /tmp/my_theme_file_list.txt --keyword=__ -o languages/my_theme.pot
@Hailong
Hailong / README.md
Last active August 29, 2015 14:27 — forked from nicerobot/README.md
Mac OS X uninstall script for packaged install of node.js

To run this, you can try:

curl -ks https://gist.github.com/nicerobot/2697848/raw/uninstall-node.sh | bash

I haven't tested this script doing it this way but i run a lot of my Gists like this so maybe this one'll work too.

Alternatively,

curl -ksO https://gist.github.com/nicerobot/2697848/raw/uninstall-node.sh

chmod +x ./uninstall-node.sh

@Hailong
Hailong / makeapp.sh
Last active August 29, 2015 14:26 — forked from demonbane/makeapp.sh
Create a Fluid-style app launcher for single-window Chrome instances on OSX
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name="$inputline"
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url="$inputline"