Skip to content

Instantly share code, notes, and snippets.

{ "name": "Tumblr full size images"
, "version": "1.0"
, "description": "Never show image thumbnails on tumblr"
, "homepage_url": "https://gist.github.com/johan/6336414"
, "manifest_version": 2
, "content_scripts":
[ { "js":
[ "tumblr-full-size-images.user.js"
]
, "matches":
" copy all this into a vim buffer, save it, then...
" source the file by typing :so %
" Now the vim buffer acts like a specialized application for mastering vim
" There are two queues, Study and Known. Depending how confident you feel
" about the item you are currently learning, you can move it down several
" positions, all the way to the end of the Study queue, or to the Known
" queue.
" type ,, (that's comma comma)
#!/bin/sh
# use `printf "\033[{{STYLE}};{{FOREGROUND_COLOR}};{{BACKGROUND_COLOR}}m"` to set the color of all the output from the shell
# use `printf "\033[0m"` to reset
for attr in 0 1 4 5 7 ; do
echo "----------------------------------------------------------------"
printf "ESC[%s;Foreground;Background - \n" $attr
for fore in 30 31 32 33 34 35 36 37; do
for back in 40 41 42 43 44 45 46 47; do
#!/bin/sh
printf "\033[5;31;40m";
echo " █████▒█ ██ ▄████▄ ██ ▄█▀";
echo "▓██ ▒ ██ ▓██▒▒██▀ ▀█ ██▄█▒ ";
echo "▒████ ░▓██ ▒██░▒▓█ ▄ ▓███▄░ ";
echo "░▓█▒ ░▓▓█ ░██░▒▓▓▄ ▄██▒▓██ █▄ ";
echo "░▒█░ ▒▒█████▓ ▒ ▓███▀ ░▒██▒ █▄";
echo " ▒ ░ ░▒▓▒ ▒ ▒ ░ ░▒ ▒ ░▒ ▒▒ ▓▒";
echo " ░ ░░▒░ ░ ░ ░ ▒ ░ ░▒ ▒░";
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
@wenLiangcan
wenLiangcan / prun.py
Last active August 29, 2015 14:05 — forked from zhangchunlin/prun
#! /usr/bin/env python
#coding=utf-8
import gevent
from gevent.subprocess import Popen, PIPE
import sys
def run(cmd,name="",index=1,color=True):
fc = 32 + index%5
if name:
import os.path
import sys
import time
import torrent
def get_meta(path):
f = open(path, "r")
s = f.read()

Introduction

Saves an image from clipboard to a file.

Dependencies:

  • python2
  • PyGTK

Installation

@wenLiangcan
wenLiangcan / introrx.md
Last active August 29, 2015 14:07 — forked from staltz/introrx.md

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.