Skip to content

Instantly share code, notes, and snippets.

@jerryw
jerryw / git乱码解决方案汇总.txt
Created October 4, 2012 05:54 — forked from xkyii/git乱码解决方案汇总.txt
git乱码解决方案汇总
原帖地址: http://topic.csdn.net/u/20110113/19/b0d5d506-4307-428b-a61d-7974aa66a2da.html
首先要说明的是:这里介绍的方法都是大部分是本人“悟”出来的,所以网上难有流传!
好方法不能自己私藏,否则就白忙乎这几天了,分享给有需要的朋友们。如果有转载,敬请注明来自*CSDN老邓*作品。
呵呵,给自己打广告,实在是无耻之极,权当无聊之时打字之用。
欢迎流传,为最优秀的分布式版本管理系统Git做宣传!!
步骤:
1. 下载:http://loaden.googlecode.com/files/gitconfig.7z
2. 解压到:<MsysGit安装目录>/cmd/,例如:D:\Program Files\Git\cmd
@jerryw
jerryw / gist:3958549
Created October 26, 2012 12:42 — forked from wildjcrt/gist:2007247
batch delete Kindle Personal Document js code
javascript:(function(){ var v = new RegExp("PersonalDocuments"); if (!v.test(document.URL)) { return false; } {a=document.getElementsByClassName('rowBodyCollapsed');for(var i = 0; i<a.length; i++){Fion.deleteItem('deleteItem_'+a[i].getAttribute('asin'));};return; }})();
@jerryw
jerryw / FileTransfer.py
Created November 8, 2012 04:43 — forked from omz/FileTransfer.py
File Transfer script for Pythonista (iOS) #python #pyhonista
# File Transfer for Pythonista
# ============================
# This script allows you to transfer Python files from
# and to Pythonista via local Wifi.
# It starts a basic HTTP server that you can access
# as a web page from your browser.
# When you upload a file that already exists, it is
# renamed automatically.
# From Pythonista's settings, you can add this script
# to the actions menu of the editor for quick access.

Nexus One

  • NME: 460
  • renderMode=GPU: 410
  • Starling: 500
  • Genome2D: 440
  • ND2D: 0

Galaxy Nexus

Run like so:

node gist-clone-all.js username

You'll want to replace "username" with your own username.

This script clones using the push URL, so you should probably be the owner of the gists. You could also use this to clone someone else's gists, but in that case you may wish to edit the code to use gist_pull_url instead.

require 'java'
require 'swt'
# Each Swt application need a display to interact with the operating system.
# It provides the event loop.
display = Swt::Widgets::Display.new
# Let's create a new window. It's called "Shell" in Swt vocabulary.
# Note that we pass in a display.
shell = Swt::Widgets::Shell.new(display)
package httpclient
import (
"net"
"net/http"
"time"
)
type Config struct {
ConnectTimeout time.Duration
from struct import *
ofile=open('sz000680.day','rb')
buf=ofile.read()
ofile.close()
ifile=open('sz000680.txt','w')
num=len(buf)
no=num/32
b=0
e=32
Installing Ruby 2.0.0 on Kindle
===============================
So I've just jailbroken my Kindle, and want to run Ruby on it.
This is what I have right now on my Kindle:
* [KUAL](http://www.mobileread.com/forums/showthread.php?t=203326), the Kindle Unified Applications Launcher
* [KTERM](http://www.fabiszewski.net/kindle-terminal/) with tmux
Make sure you've also enabled `usbnetwork` so that you can SSH to your kindle via USB.
qApp->setStyle(QStyleFactory::create("Fusion"));
QPalette darkPalette;
darkPalette.setColor(QPalette::Window, QColor(53,53,53));
darkPalette.setColor(QPalette::WindowText, Qt::white);
darkPalette.setColor(QPalette::Base, QColor(25,25,25));
darkPalette.setColor(QPalette::AlternateBase, QColor(53,53,53));
darkPalette.setColor(QPalette::ToolTipBase, Qt::white);
darkPalette.setColor(QPalette::ToolTipText, Qt::white);
darkPalette.setColor(QPalette::Text, Qt::white);