Skip to content

Instantly share code, notes, and snippets.

@mridgers
mridgers / pdbdump.c
Created June 21, 2012 21:19
Small tool to list and query symbols in PDB files.
//------------------------------------------------------------------------------
// pdbdump.c - dump symbols from .pdb and executable files (public domain).
// - to compile; cl.exe /Ox /Zi pdbdump.c
// -
// - Martin Ridgers, pdbdump 'at' fireproofgravy.co.uk
//------------------------------------------------------------------------------
#include <stdio.h>
#include <Windows.h>
#include <DbgHelp.h>
@Lexikos
Lexikos / menu-search.ahk
Created March 7, 2013 11:58
Window Menu Search - tap the Alt key to search the active window's menus. http://www.autohotkey.com/board/topic/91067-/
SetBatchLines -1
OnMessage(0x100, "GuiKeyDown")
OnMessage(0x6, "GuiActivate")
return
Alt::
Gui +LastFoundExist
if WinActive()
goto GuiEscape
Gui Destroy
@markSci5
markSci5 / Git checkout remote branch
Created July 3, 2013 07:08
Git checkout remote branch
//To fetch a branch, you simply need to:
git fetch origin
//This will fetch all of the remote branches for you. With the remote branches
//in hand, you now need to check out the branch you are interested in, giving
//you a local working copy:
git checkout -b test origin/test
@oleavr
oleavr / frida-core-1.0.vapi
Last active January 20, 2024 03:15
The frida-core API consumed by bindings like frida-python, frida-qml, etc.
[CCode (cheader_filename = "frida-core.h", cprefix = "Frida", lower_case_cprefix = "frida_")]
namespace Frida {
public static void init ();
public static void shutdown ();
public static void deinit ();
public static unowned GLib.MainContext get_main_context ();
public class DeviceManager : GLib.Object {
public DeviceManager ();
/*
Change Log:
v1.12 (2017-01-18) - Fixed OnExit not exiting
v1.11 (2017-01-17) - Added an internal function Ensure_Admin_And_Compiled()
v1.10 (2015-10-22) - Added support for sending characters that needs to press {shift} key, such as "@" or "A".
v1.00 (2015-07-25)
Dependency files:
WinRing0_v1.3.1.19.zip -- https://drive.google.com/file/d/0B7yNOlCgfluzMTE2UFc2ZHp5Z1E/view?usp=sharing
@taoyuan
taoyuan / npm-using-https-for-git.sh
Last active June 12, 2024 13:31
Force git to use https:// instead of git://
# npm using https for git
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://
# npm using git for https
git config --global url."git@github.com:".insteadOf https://github.com/
git config --global url."git://".insteadOf https://
@gorhill
gorhill / gist:ef1b62d606473c68d524
Last active February 16, 2023 21:17
Disqus comments widget: on-demand
! Title: Disqus click-to-load
# Copy-paste the static filters below into your "My filters" pane in the
# dashboard.
# Purpose is to load Disqus comments on demand only, so that no connection
# to `disqus.com` occurs by default when you land on a site which uses
# Disqus comments widget.
# Not connecting to Disqus by default is a good thing for such a
# ubiquitous server as `disqus.com`, which can be used to build a
@varhub
varhub / Android - Enable ADB from recovery.md
Created December 23, 2016 17:54
Android - Enable ADB from recovery

Android - Enable ADB from recovery

Credits to @TheOnlyAnil-@Firelord[^stackoverflow]

  • Requirements: a) stock recovery + rooted phone b) custom recovery

  • Files changed:

@kkeybbs
kkeybbs / chrome_flags.updated.js
Last active February 5, 2024 07:47
Backup chrome flags to json and restore the backup on another machine.
// 2022-04-03, tested with Chrome 99.0.4844.84 on MacBook Pro m1
/*
Open chrome://flags/
F12 open developer console, swtich to tab "Console"
Paste below codes
- input backup() to download flags backup file
- input restore() to select one backup to restore
*/
function saveFile(filename, data) {
# Powershell script to bypass UAC on Vista+ assuming
# there exists one elevated process on the same desktop.
# Technical details in:
# https://tyranidslair.blogspot.co.uk/2017/05/reading-your-way-around-uac-part-1.html
# https://tyranidslair.blogspot.co.uk/2017/05/reading-your-way-around-uac-part-2.html
# https://tyranidslair.blogspot.co.uk/2017/05/reading-your-way-around-uac-part-3.html
# You need to Install-Module NtObjectManager for this to run.
Import-Module NtObjectManager