Skip to content

Instantly share code, notes, and snippets.

Introduction

Saves an image from clipboard to a file.

Dependencies:

  • python2
  • PyGTK

Installation

import os.path
import sys
import time
import torrent
def get_meta(path):
f = open(path, "r")
s = f.read()
@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:
## 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
#!/bin/sh
printf "\033[5;31;40m";
echo " █████▒█ ██ ▄████▄ ██ ▄█▀";
echo "▓██ ▒ ██ ▓██▒▒██▀ ▀█ ██▄█▒ ";
echo "▒████ ░▓██ ▒██░▒▓█ ▄ ▓███▄░ ";
echo "░▓█▒ ░▓▓█ ░██░▒▓▓▄ ▄██▒▓██ █▄ ";
echo "░▒█░ ▒▒█████▓ ▒ ▓███▀ ░▒██▒ █▄";
echo " ▒ ░ ░▒▓▒ ▒ ▒ ░ ░▒ ▒ ░▒ ▒▒ ▓▒";
echo " ░ ░░▒░ ░ ░ ░ ▒ ░ ░▒ ▒░";
#!/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
" 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)
{ "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":
#Create a new file in your home directory called .gtkrc-eclipse
# call eclipse with this command:
# env GTK2_RC_FILES=/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:/home/USER/.gtkrc-eclipse '/path_to_eclipse/eclipse'
# env GTK2_RC_FILES=/home/wheely/.themes/Siva/gtk-2.0/gtkrc:/home/wheely/.gtkrc-eclipse '/usr/bin/eclipse'
# In your Eclipse directory find the file 'plugins/org.eclipse.platform_4.2.*/css/e4_default_gtk.css'
# (there's an * in there, because I guess that the version may change in the future or may be different already).
# In this file there's a CSS class: