This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 ) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"golang.org/x/net/webdav" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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(',') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |