Skip to content

Instantly share code, notes, and snippets.

View AndrewSav's full-sized avatar

Andrew Savinykh AndrewSav

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote fetch="git://github.com/" name="gh" />
<!-- Device Repos -->
<project name="darkspadez/android_device_lge_g3-common" path="device/lge/g3-common" remote="gh" revision="cm-11.0" />
<project name="darkspadez/android_device_lge_vs985" path="device/lge/vs985" remote="gh" revision="cm-11.0" />
<project name="SlimRoms/device_motorola_falcon" path="device/motorola/falcon" remote="gh" revision="kk4.4" />
<project name="SlimRoms/device_motorola_ghost" path="device/motorola/ghost" remote="gh" revision="kk4.4" />
<project name="SlimRoms/device_motorola_peregrine" path="device/motorola/peregrine" remote="gh" revision="kk4.4" />
@SamSaffron
SamSaffron / gist:1599013
Created January 12, 2012 05:59
dapper.rainbow
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using Dapper;
// to have a play, install Dapper.Rainbow from nuget
@childsish
childsish / mordheim.ps1
Last active July 8, 2018 05:46
A simple Powershell save game backup script to cheese Mordheim: City of the Damned
$Process = @(Get-CimInstance Win32_Process -Filter "Name='powershell.exe' AND CommandLine LIKE '%mordheim.ps1%'")
if ($Process.Count -gt 1) {
exit
}
Add-Type -Name Window -Namespace Console -MemberDefinition '
[DllImport("Kernel32.dll")]
public static extern IntPtr GetConsoleWindow();
[DllImport("user32.dll")]
@diego898
diego898 / rd.md
Last active October 13, 2020 21:18
Enable Concurrent Remote Desktop Users in Windows 8.1 x64

thanks to @neurodyne and this link for updated instructions

This works with the following versions of termsrv.dll

x64 - termsrv.dll - 6.3.9600.17095

Find Replace
39813C0600000F849E310500 B80001000089813806000090
090085C07F078BD8 090085C090908BD8
@timruffles
timruffles / attack.md
Last active November 21, 2020 17:35
Chrome/Gmail attack received 11/03/2016. Not sure if the Chrome meta refresh + data:text,html technique is novel.

The following attack will display a "you've been signed out" page for GMail, and attempt to steal your account credentials.

DO NOT PUT ANY ACCOUNT CREDENTIALS INTO ANY TABS CREATED AFTER VISITING THESE LINKS :)

I received an email in my GMail inbox with a fake attachment image, styled to look like the real GMail attachment UI:

fake

This linked to a page that ended up displaying a fake "you've been signed out" link, via the data:text/html... URL feature of Chrome:

@yringler
yringler / RouteWithQueryParamatersAttribute.cs
Last active April 1, 2021 16:39
MVC Core: Prefer action which best matches query parameters
using Microsoft.AspNetCore.Mvc.ActionConstraints;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using MoreLinq;
using System;
using System.Linq;
namespace Api.Constraints
{
/// <summary>
/// Use amount of matching query parameters to find the right action.
@DonnchaC
DonnchaC / torrent-file-size.py
Last active July 14, 2022 03:06
Get total file sizes of contents for a set of .torrent files
import os
import sys
import bencodepy
import humanize
import argparse
def total_size_files_torrent(file_name):
try:
parsed = bencodepy.decode_from_file(file_name)
@P7h
P7h / Install_7zip_on_Linux.md
Last active October 4, 2023 04:46
7zip install on Linux -- Ubuntu and Fedora or CentOS / RHEL

Steps to install 7zip on Linux » Ubuntu and Fedora or CentOS / RHEL

Ubuntu

cat /etc/*release
sudo apt-get update -yqq
sudo apt-get install -yqq p7zip-full
@jbinto
jbinto / howto-recover-google-authenticator-keys.txt
Created February 8, 2014 04:20
Recovering Google Authenticator keys from Android device for backup
### Last tested February 7 2014 on a Galaxy S3 (d2att) running Cyanogenmod 11 nightly, with Google Authenticator 2.49.
### Device with Google Authenticator must have root.
### Computer requires Android Developer Tools and SQLite 3.
### Connect your device in USB debugging mode.
$ cd /tmp
$ adb root
$ adb pull /data/data/com.google.android.apps.authenticator2/databases/databases
@jaywilliams
jaywilliams / install-mosh.sh
Last active January 3, 2024 17:16 — forked from palexander/gist:2975305
Compiling and running mosh on Dreamhost (Updated - 2024)
#!/usr/bin/env bash
set -e
# Dreamhost Mosh Install Script
# Jay Williams (https://gist.github.com/jaywilliams/c9ffab789b3f622abc932dd4cfaaeef5)
# Based on the gracious work of:
# Paul R Alexander (https://gist.github.com/palexander/2975305)
# Sami Samhuri https://gist.github.com/samsonjs/4076746