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
/* | |
sublime-imfix.c | |
Use LD_PRELOAD to interpose some function to fix sublime input method support for linux. | |
By Cjacker Huang <jianzhong.huang at i-soft.com.cn> | |
gcc -shared -o libsublime-imfix.so sublime_imfix.c `pkg-config --libs --cflags gtk+-2.0` -fPIC | |
LD_PRELOAD=./libsublime-imfix.so sublime_text | |
*/ | |
#include <gtk/gtk.h> | |
#include <gdk/gdkx.h> |
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 | |
cd /opt/sublime_text &&\ | |
sudo wget "https://gist.githubusercontent.com/wrfly/baf1314ae25f41fe8cde/raw/45c669808bed8eb6d98fe6caa3f730076e5aede3/imfix.c" | |
sudo apt-get install build-essential libgtk2.0-dev | |
sudo gcc -shared -o imfix.so imfix.c `pkg-config --libs --cflags gtk+-2.0` -fPIC | |
sudo sed -i "s/exec/LD_PRELOAD=\/opt\/sublime_text\/imfix.so/" /usr/bin/subl | |
sudo sed -i "s/\/opt\/sublime_test\/sublime_text/subl/g" /usr/share/applications/sublime_text.desktop | |
echo "Succeed!" | |
exit 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
#!/bin/bash | |
# A little chat progream via ncat | |
# Author:wrfly Date:2015.7 | |
# Usage: | |
# Server: ncat -e chat.sh -lk & | |
# Client: ncat server_ip | |
#config | |
db_users=user_lists | |
db_rooms=db_rooms |
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 | |
# By-WrFly | |
cp /etc/apt/sources.list /etc/apt/sources.list.bak | |
echo " | |
deb-src http://http.kali.org/kali sana main non-free contrib | |
deb-src http://security.kali.org/kali-security sana/updates main contrib non-free | |
deb http://http.kali.org/kali sana main non-free contrib | |
deb http://security.kali.org/kali-security sana/updates main contrib non-free | |
" > /etc/apt/sources.list |
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 | |
# By-WrFly | |
cp /etc/apt/sources.list /etc/apt/sources.list.bak | |
echo " | |
deb-src http://http.kali.org/kali sana main non-free contrib | |
deb-src http://security.kali.org/kali-security sana/updates main contrib non-free | |
deb http://http.kali.org/kali sana main non-free contrib | |
deb http://security.kali.org/kali-security sana/updates main contrib non-free | |
" > /etc/apt/sources.list |
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
#include <sys/time.h> | |
#include <signal.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <string.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
#include <unistd.h> | |
#include <stdio.h> |
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/python | |
# -*- coding:utf-8 -*- | |
# A script to get zhihu followers and followees. | |
import urllib2 | |
import json | |
HEADERS = dict() | |
HEADERS["Pragma"] = "no-cache" |
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
package main | |
import ( | |
"log" | |
"github.com/gliderlabs/ssh" | |
) | |
func main() { | |
log.Println("starting ssh server on port 2222...") |
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
package main | |
import ( | |
"context" | |
"log" | |
"time" | |
"github.com/bsm/ratelimit" | |
"github.com/tsenart/tb" | |
// jujuRatelimit "github.com/juju/ratelimit" |
OlderNewer