Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
SHORTCUT="[Desktop Entry]
Name=Sublime Text 2
Comment=Edit text files
Exec=/usr/local/sublime-text-2/sublime_text
Icon=/usr/local/sublime-text-2/Icon/128x128/sublime_text.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Utility;TextEditor;"

Sublime Text 2 – Useful Shortcuts (Windows)

General

Ctrl+KB toggle side bar
Ctrl+Shift+P command prompt
Ctrl+` python console
Ctrl+N new file

Editing

# -*- coding: utf8 -*-
# 下载速度很慢,
import urllib2, urllib
import sys
import os
import socket
import re
import socks
#include <stdio.h>
int main()
{
int s,temp,i,j,a[20];
printf("Enter total no. of elements:");
scanf("%d",&s);
printf("Enter %d elements:",s);
for(i=0;i<s;i++)
#!/bin/bash
# Author: Damien Cassou
#
# This is the script I use to build https://launchpad.net/~cassou/+archive/emacs/
# from http://emacs.naquadah.org/.
MAIN_VERSION=20130527
SUB_VERSION=1
# -*- Encoding: utf-8 -*-
import urllib
from httplib2 import Http
LOGIN_URL = 'http://www.renren.com/PLogin.do'
FRIENDS_URL = 'http://friend.renren.com/myfriendlistx.do'
h = Http()
h.follow_redirects = False
#!/bin/bash
#####################################
#Author: Leon Lee #
#email: [email protected] #
#QQ: 730395591 #
#Version: 1.0 #
#Note: If you have some good ideas #
# or advice, please mail me^^ #
#####################################

测试平台:DigitalOcean VPS ubuntu14.04 x64, strongswan5.2.2

运行以下命令请使用root权限

一:安装strongswan

由于ubuntu软件仓库中strongswan版本较低,因此从官网源码编译安装

apt-get install build-essential     #编译环境
aptitude install libgmp10 libgmp3-dev libssl-dev pkg-config libpcsclite-dev libpam0g-dev     #编译所需要的软件
from ryu.base import app_manager
from ryu.controller import ofp_event
from ryu.controller.handler import CONFIG_DISPATCHER, MAIN_DISPATCHER
from ryu.controller.handler import set_ev_cls
from ryu.ofproto import ofproto_v1_3
from ryu.lib.packet import packet
from ryu.lib.packet import ethernet
class SimpleSwitch13(app_manager.RyuApp):
@ustbgaofan
ustbgaofan / config.h
Created November 27, 2017 06:30 — forked from soulmachine/config.h
写纯C代码时用的公共头文件
/** @file config.h
* @brief 公共头文件
* @author [email protected]
* @date 2010-8-3
* @version 0.1
* @note 无
*/
#ifndef _CONFIG_H_
#define _CONFIG_H_