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/bash | |
prog=${0##*/} | |
function usage () | |
{ | |
cat << EOF | |
NAME | |
$prog - Install rbenv. |
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
// Non Editor code | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public abstract class TrafficLightAttribute : PropertyAttribute | |
{ | |
public bool DrawLabel = true; | |
public string CustomLabel; | |
public bool AlsoDrawDefault; |
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
# Bridge for VMs (default on Fedora is virbr0) | |
BRIDGE=virbr0 | |
# Cloud init files | |
USER_DATA=user-data | |
META_DATA=meta-data | |
CI_ISO=$1-cidata.iso | |
# cloud-init config: set hostname, remove cloud-init package, | |
# and add ssh-key |
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/bash | |
# Install Time Machine service on CentOS 7 | |
# http://netatalk.sourceforge.net/wiki/index.php/Netatalk_3.1.7_SRPM_for_Fedora_and_CentOS | |
# http://confoundedtech.blogspot.com/2011/07/draft-draft-ubuntu-as-apple-time.html | |
# https://zitseng.com/archives/6182 | |
# https://gist.github.com/darcyliu/f3db52d6d60ef4f4f4ef | |
sudo yum install -y avahi-devel bison cracklib-devel dbus-devel dbus-glib-devel docbook-style-xsl flex libacl-devel libattr-devel libdb-devel libevent-devel libgcrypt-devel krb5-devel mysql-devel openldap-devel openssl-devel pam-devel quota-devel systemtap-sdt-devel tcp_wrappers-devel libtdb-devel tracker-devel | |
wget http://www003.upp.so-net.ne.jp/hat/files/netatalk-3.1.8-0.1.4.fc24.src.rpm |
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 ruby | |
require "fileutils" | |
list_fn = ARGV[0] | |
root_dir = ARGV[1] | |
sames = [] | |
is_same_files = false |
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
const char hex_asc[] = "0123456789abcdef"; | |
#define hex_asc_lo(x) hex_asc[((x) & 0x0f)] | |
#define hex_asc_hi(x) hex_asc[((x) & 0xf0) >> 4] | |
static inline char *hex_byte_pack(char *buf, u8 byte) | |
{ | |
*buf++ = hex_asc_hi(byte); | |
*buf++ = hex_asc_lo(byte); | |
return buf; | |
} |
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 ruby | |
# this script used to convert gbk encoding torrent to utf8 encoding | |
require "bencode" | |
def print_files(data) | |
files = data["info"]["files"] | |
files.each do |f| | |
path = f["path"][0] |
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
var Face = | |
{ | |
version : '1.0.0', | |
noInit : true, | |
face : ['(',')','[',']','|','|'], | |
eyes : [' ̄',' ̄','—','—','_','_','﹁','﹁','^','^','~','~','=','=','@','@','·','·','`','′','>','<','→','←','〒','〒','┬','┬','T','T','゜','゜','。','。','●','●','◎','◎','⊙','⊙','○','○','╯','╰','︶','︶','〃','〃','Φ','Φ','Θ','Θ','+','+','x','x','$','$','≥','≤','u','u','U','U','・ิ', '・ิ', '❛', '❛', '⊙', '⊙', ' ̄', ' ̄', '◕ˇ', 'ˇ◕'], | |
mouth : [ | |
// mouth |
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
// Usb control: http://openkinect.org/wiki/Protocol_Documentation#Control_Packet_Structure | |
#include <XnUSB.h> | |
#include <cstdio> | |
#include <cstring> | |
#ifdef _WIN32 | |
#include <Windows.h> | |
void sleep_ (int s) | |
{ |
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
/* | |
12306 Auto Login => A javascript snippet to help you auto login 12306.com. | |
Copyright (C) 2011 Kevintop | |
Includes jQuery | |
Copyright 2011, John Resig | |
Dual licensed under the MIT or GPL Version 2 licenses. | |
http://jquery.org/license | |
Includes 12306.user.js |
NewerOlder