Skip to content

Instantly share code, notes, and snippets.

View Rand01ph's full-sized avatar
⚠️
raise NotImplementedError

9r0k Rand01ph

⚠️
raise NotImplementedError
View GitHub Profile
#!/bin/bash
# install xcode command tool
xcode-select --install
# check
xcode-select -p
# install brew
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@Rand01ph
Rand01ph / ckedit.py
Last active August 29, 2015 14:13 — forked from mrjoes/ckedit.py
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext import admin, wtf
from flask.ext.admin.contrib import sqlamodel
app = Flask(__name__)
app.config['SECRET_KEY'] = '123456790'
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///test.sqlite'
db = SQLAlchemy(app)
import urllib.request
import re
import datetime
from datetime import timedelta
import ctypes
import winsound
def search(fromDate,toDate):
found = False
while not found:
#! /usr/bin/env python
# coding=utf-8
__author__ = 'jszhou'
from bottle import *
import hashlib
import xml.etree.ElementTree as ET
import urllib2
# import requests
import json
<?php
class Token
{
private $mmc;
private $cache_time;
function __construct()
{
$this->cache_time = 60 * 60 * 24;
@Rand01ph
Rand01ph / vps_auto_backup.sh
Created November 10, 2012 11:55 — forked from wangyan/vps_auto_backup.sh
vps automatic local and offsite backup shell cript
#! /bin/bash
#====================================================================
# vps_auto_backup.sh
#
# Copyright (c) 2011, WangYan <webmaster@wangyan.org>
# All rights reserved.
# Distributed under the GNU General Public License, version 3.0.
#
# vps automatic local and offsite backup shell cript
#
@Rand01ph
Rand01ph / UIDevice+serialNumber.h
Created October 13, 2015 13:18 — forked from 0xced/UIDevice+serialNumber.h
UIDevice+serialNumber
/*
* Adds the serialNumber property to the UIDevice class
*
* The implementation uses undocumented (for iOS) IOKit functions,
* so handle with caution and be prepared for nil.
*/
#import <UIKit/UIDevice.h>
@interface UIDevice (serialNumber)
@Rand01ph
Rand01ph / gist:87516c4cb69dc1206fd0
Created December 21, 2015 12:46 — forked from puentesarrin/gist:8290754
Python alternative installation
$ cd /usr/local/src
$ wget http://www.python.org/ftp/python/3.4.0/Python-3.4.0b2.tgz
$ tar -xzf Python-3.4.0b2.tgz Python-3.4.0b2
$ cd Python-3.4.0b2
$ ./configure --enable-shared --prefix=/usr/local
$ make
$ make altinstall
$ python3.4
@Rand01ph
Rand01ph / install-tmux
Created December 23, 2015 03:12 — forked from rothgar/install-tmux
Install tmux 1.9 on rhel/centos 6
# Install tmux on Centos release 6.5
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar -xvzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/usr/local
@Rand01ph
Rand01ph / patch2.sql
Last active May 30, 2016 10:47
MySQL stored procedure
DELIMITER //
DROP PROCEDURE IF EXISTS ts_init//
CREATE PROCEDURE ts_init ()
BEGIN
DECLARE Done INT DEFAULT 0;
DECLARE CurrentEventTypeId INT;
DECLARE CurrentEventTypeName VARCHAR(10);