Skip to content

Instantly share code, notes, and snippets.

View gu-fan's full-sized avatar
🏠
Working from home

Rykk gu-fan

🏠
Working from home
View GitHub Profile
@gu-fan
gu-fan / server_setup
Created December 12, 2012 12:00
server_setup
#!/usr/bin/env bash
# Server Deployment Script
# Summary: Setup basic deploy enviroment for web apps.
# Author: Rykka (rykka10@gmail.com)
# OS: ubuntu 12.04
# Usage: sh server_setup $HOST_NAME
# Via net: wget --no-check-certificate https://gist.github.com/raw/4267247/37aa9dc296e3777161bd2b006b7f5f9d765f073b/server_setup -O - | sh
# Install puppet , and use puppet to intall
# nginx and mysql and uwsgi
@gu-fan
gu-fan / .zshrc
Created December 12, 2012 13:33
zshrc
# autoload omz
# zstyle :omz:style theme default
# plugins=(archlinux sprunge git)
# omz init
bindkey -v
ZSH=$HOME/.oh-my-zsh
#~/.oh-my-zsh/themes/rykka.zsh-theme
ZSH_THEME="kolo" # ~/.oh-my-zsh/themes/
# plugins=(git archlinux django github)
@gu-fan
gu-fan / .vimrc
Created December 12, 2012 13:37
vimrc
"""""""""""""""""""""""""""""""""""""""""""""""""
" Script: Rykka's Vimrc
" Author: Rykka <Rykka10(at)gmail.com>
" Update: 2012-12-12
" License: WTFPL v2.0
" vim:ft=vim tw=0 sw=4 ts=4 sts=4 fdm=marker fdls=0 :
"""""""""""""""""""""""""""""""""""""""""""""""""
" TODO:
from django import forms
from django.conf import settings
class KindWidget(forms.Textarea):
"""
Setup the JS files and targetting CSS class for a textarea to
use TinyMCE.
"""
class Media:
KindEditor.ready(function(K) {
K.create('#id_content', { height:'400px',
});
});
a = '' if b else 2
print(a)
[
// cursor movement
{ "keys": ["alt+h"], "command": "move", "args": {"by": "characters", "forward": false} },
{ "keys": ["alt+l"], "command": "move", "args": {"by": "characters", "forward": true} },
{ "keys": ["alt+k"], "command": "move", "args": {"by": "lines", "forward": false} },
{ "keys": ["alt+j"], "command": "move", "args": {"by": "lines", "forward": true} },
{ "keys": ["alt+w"], "command": "left_delete" },
// selection
{ "keys": ["ctrl+l"], "command": "expand_selection", "args": {"to": "line"} },
@gu-fan
gu-fan / gist:5336055
Created April 8, 2013 11:22
Overriding Bootstrap Carousel Animation with css3
.carousel .item {
-webkit-transition: .7s ease-in-out opacity;
-moz-transition: .7s ease-in-out opacity;
-ms-transition: .7s ease-in-out opacity;
-o-transition: .7s ease-in-out opacity;
transition: .7s ease-in-out opacity;
left: 0 !important;
}
@gu-fan
gu-fan / gist:5343210
Created April 9, 2013 05:35
ssh debug
OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to lesscolor.com [198.98.119.171] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/ryk/.ssh/id_rsa" as a RSA1 public key
debug1: identity file /home/ryk/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
Author: Rykka
Create:2012-05-14
Update:2013-05-19

Riv

Always bear in mind that your own resolution to succeed is more important than any other.

—Abraham Lincoln