Skip to content

Instantly share code, notes, and snippets.

View weaming's full-sized avatar
🦀
Rustacean

Garden Yuen weaming

🦀
Rustacean
  • Shenzhen, China
View GitHub Profile
@shellexy
shellexy / NoCSS.js
Created January 6, 2018 11:44
去除网页样式的 bookmarklet 书签工具
javascript:
(function(){
if (f=document.querySelector('frame[name="Main"]')) {
window.location.href = f.src;
}
document.body.style.margin = "10%";
document.body.style.lineHeight = "2em";
document.body.bgColor = "#F5F5B5";
document.body.text = "#000000";
@douglasmiranda
douglasmiranda / install.sh
Last active October 23, 2019 02:26
After Install Ubuntu 17.10 - Chrome, Fish Shell, Docker, Docker Compose
sudo apt update
sudo apt upgrade -y
# Remember: install / verify additional drivers
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo apt update
# google chrome and chrome extension to use gnome extensions
@oliveratgithub
oliveratgithub / emojis.json
Last active April 26, 2024 22:35
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "👩‍👩‍👧‍👧", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "👩‍👩‍👧‍👦", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "👩‍👩‍👦‍👦", "category": "People & Body (family)", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "👨‍👩&z
@easychen
easychen / weibopicbed.js
Created July 16, 2017 08:30
微博图床上传函数
// from https://github.com/suxiaogang/WeiboPicBed
// under its license
function uploadToWeibo( url , callback )
{
var xhr = new XMLHttpRequest();
xhr.onload = function() {
var reader = new FileReader();
reader.onloadend = function( e )
{
@cmer
cmer / haproxy.cfg
Last active April 15, 2024 09:54
Simple, no bullshit TCP port forwarding using HAProxy
listen l1
bind 0.0.0.0:443
mode tcp
timeout connect 4000
timeout client 180000
timeout server 180000
server srv1 host.example.com:9443
@staaldraad
staaldraad / webdavserv.go
Last active April 14, 2024 03:53
A small webdav server in go
package main
import (
"flag"
"fmt"
"log"
"net/http"
"os"
"golang.org/x/net/webdav"
func uploadWeibo(fn string) ([]byte, error) {
file, err := os.Open(fn)
if err != nil {
return nil, err
}
defer file.Close()
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
#!/usr/bin/env python
import sys
from graphviz import Digraph
dot = Digraph(comment='alembic')
def split_line(line):
bases, _, name_and_target = line.partition('->')
id_and_stuff, _, desc = name_and_target.strip().partition(',')
/*Solution for Friends Algorithm written in JavaScript
Painful lessons learned
Javascript keys are always strings
*/
var relationships
var raw_data
//Turn strings into sparse array for search
@nikAizuddin
nikAizuddin / oreilly-freebooks.sh
Last active October 20, 2020 03:34
This UNIX Shell script will download most O'Reilly free pdf books about Programming, Security, Business, Data, Design, IoT, WebDev, and WebOps from http://www.oreilly.com/programming/free/.
#!/bin/sh
################################################################################
## This UNIX Shell script will download most O'Reilly free pdf books
## about Programming, Security, Business, Data, Design, IoT, WebDev, and WebOps
## from http://www.oreilly.com/programming/free/.
## There are a few books that are non-free, so I don't list them here.
##
## --- How to RUN? ---
## $ sh -e oreilly-freebooks.sh