Skip to content

Instantly share code, notes, and snippets.

View quake0day's full-sized avatar
😎
..

Si Chen quake0day

😎
..
View GitHub Profile
@shiv19
shiv19 / ChromeClient.js
Last active April 13, 2020 14:00
NativeScript Disable Zoom on Webview, and load hyperlinks on default browser
// Lets you use webcam and other mobile hardware inside NativeScript WebView
exports.webViewLoaded = function (args) {
var webview = args.object;
var TNSWebViewClient =
android.webkit.WebViewClient.extend({
shouldOverrideUrlLoading: function (view, url) {
if (url != null && url.startsWith("http://")) {
console.log(url);
// use openUrl form utils module to open the page in a browser
@MatheusFaria
MatheusFaria / pokedex_ascii.h
Last active February 17, 2025 11:10
151 Pokemon ASCII Art
/**
* The ASCII arts were extracted from:
* - http://www.fiikus.net/?pokedex
* - http://www.world-of-nintendo.com/pictures/text/
* And also generated with:
* - http://www.text-image.com
*/
#ifndef __POKE_IMG__
#define __POKE_IMG__
@hugsy
hugsy / gist:b028f7268ca90f4a51640b28e0f04116
Last active November 15, 2017 19:40
csaw 2016 - hungman - pwn 300
#
# csaw 2016 - hungman - pwn 300
#
# @_hugsy_ & @rick2600
#
from pwn import *
context.update(arch="amd64", os="linux", log_level = "info")
import random, string, time
@mayanez
mayanez / Makefile
Last active November 20, 2024 13:54
Simple ROP Exploit Example (x86)
simple-rop: simple-rop.c
gcc -m32 -O0 -g -static -fno-stack-protector $^ -o $@
.PHONY: clean
clean:
rm -rf simple-rop
@toranb
toranb / osx_dev.sh
Last active December 15, 2015 05:29
Basic steps required to get your OSX Mountain Lion development machine ready for ruby / node / python
# https://developer.apple.com/downloads/index.action
# 1.) download + install XCode from the app store
# 2.) download + install the XCode command line tools from the url above
# 3.) open Xcode for the first time and agree to the terms of use
# install homebrew and install libksba
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
brew doctor
brew update
brew install libksba
int* return_pointer(){
return (int*)malloc(sizeof(int));
}
void modify_pointer(int **p){
*p = (int*)malloc(sizeof(int));
}
@zeffii
zeffii / html.html.html
Created June 24, 2012 14:11
jquery loading a markdown file and encoding as html
<script>
// get markdown content
var body_location = 'markdown/README.markdown';
function getText(myUrl){
var result = null;
$.ajax( { url: myUrl,
type: 'get',
dataType: 'html',
@chenshuo
chenshuo / hashed_list.h
Created March 28, 2012 03:32
hashed list with O(1) push_back()/push_front()/remove() operations. answers gist.github.com/2216546
#include <assert.h>
#include <list>
#include <boost/unordered_map.hpp>
#include <boost/noncopyable.hpp>
template<typename T>
class HashedList : boost::noncopyable
{
typedef typename std::list<T>::iterator ListIterator;
typedef typename std::list<T>::reverse_iterator ReverseListIterator;
@ipconfiger
ipconfiger / __init__.py
Created January 5, 2012 12:48
OAuth包,实现了sina,QQ,网易,搜狐的OAuth认证
# -*- Encoding: utf-8 -*-
import base64
import binascii
import cgi
import hashlib
import hmac
import logging
import time
import urllib
import urlparse
@yoggy
yoggy / curf_gpu.cpp
Created December 9, 2011 13:10
OpenCV cv::gpu::SURF_GPU & cv::gpu::BruteForceMatcher_GPU sample
#include <SDKDDKVer.h>
#include <Windows.h>
#pragma warning(disable:4819)
#pragma warning(disable:4996)
// for OpenCV2
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/gpu/gpu.hpp"