Skip to content

Instantly share code, notes, and snippets.

View freeznet's full-sized avatar
:bowtie:
๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก

Rui Fu freeznet

:bowtie:
๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก๐Ÿก
View GitHub Profile
@freeznet
freeznet / cheatsheet.py
Created August 27, 2016 03:48 — forked from fuyufjh/cheatsheet.py
My Python Cheatsheet
Python Cheatsheet
=================
################################ Input & Output ###############################
name = input('please enter your name: ')
print('hello,', name)
ageStr = input('please enter your age: ')
age = int(ageStr)
#Install R and then following packages
#repr failed to create
yum install R-*
install.packages("evaluate", dependencies = TRUE)
install.packages("base64enc", dependencies = TRUE)
install.packages("devtools", dependencies = TRUE)
install_github('IRkernel/repr')
install.packages("dplyr", dependencies = TRUE)
install.packages("caret", dependencies = TRUE)
install.packages("repr", dependencies = TRUE)
[General]
loglevel = notify
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 127.0.0.0/8, 100.64.0.0/10, localhost, *.local, e.crashlytics.com
bypass-tun = 192.168.0.0/16, 0.0.0.0/8, 1.0.0.0/9, 1.160.0.0/11, 1.192.0.0/11, 10.0.0.0/8, 14.0.0.0/11, 14.96.0.0/11, 14.128.0.0/11, 14.192.0.0/11, 27.0.0.0/10, 27.96.0.0/11, 27.128.0.0/9, 36.0.0.0/10, 36.96.0.0/11, 36.128.0.0/9, 39.0.0.0/11, 39.64.0.0/10, 39.128.0.0/10, 42.0.0.0/8, 43.224.0.0/11, 45.64.0.0/10, 47.64.0.0/10, 49.0.0.0/9, 49.128.0.0/11, 49.192.0.0/10, 54.192.0.0/11, 58.0.0.0/9, 58.128.0.0/11, 58.192.0.0/10, 59.32.0.0/11, 59.64.0.0/10, 59.128.0.0/9, 60.0.0.0/10, 60.160.0.0/11, 60.192.0.0/10, 61.0.0.0/10, 61.64.0.0/11, 61.128.0.0/10, 61.224.0.0/11, 100.64.0.0/10, 101.0.0.0/9, 101.128.0.0/11, 101.192.0.0/10, 103.0.0.0/10, 103.192.0.0/10, 106.0.0.0/9, 106.224.0.0/11, 110.0.0.0/7, 112.0.0.0/9, 112.128.0.0/11, 112.192.0.0/10, 113.0.0.0/9, 113.128.0.0/11, 113.192.0.0/10, 114.0.0.0/9, 114.128.0.0/11, 114.192.0.0/10, 115.0.0.0/8, 116.0.0.0/8, 117.0.0.0/9,
@freeznet
freeznet / 0_reuse_code.js
Last active August 29, 2015 14:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@freeznet
freeznet / ckedit.py
Last active August 29, 2015 14:21 — 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)
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#fde0dc</color>
<color name="md_red_100">#f9bdbb</color>
<color name="md_red_200">#f69988</color>

** ็›ฎๅ‰ไป…ๆ”ฏๆŒ MacOS ##

ๆ‰“ๅผ€็ปˆ็ซฏ็จ‹ๅบ, ๅคๅˆถใ€็ฒ˜่ดดใ€ๆ‰ง่กŒไปฅไธ‹ๅฅๅญ๏ผš

curl -s -I https://www.atom.io/api/updates/download --header 'User-Agent: Atom/0.1 CFNetwork/1.5'|grep '^Location:'| sed -e 's+^.*\(https://.*\)$+\1+g'

็จ็ญ‰็‰‡ๅˆป๏ผŒไผš่พ“ๅ‡บ็ฑปไผผไธ‹้ข็š„ไธ€่กŒๅ†…ๅฎน๏ผš

@freeznet
freeznet / firewall.sh
Created December 10, 2013 13:51 — forked from x1a0/firewall.sh
#! /bin/bash
# Set the default policies to allow everything while we set up new rules.
# Prevents cutting yourself off when running from remote SSH.
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
# Flush any existing rules, leaving just the defaults
iptables -F