Skip to content

Instantly share code, notes, and snippets.

@AKosterin
AKosterin / DexGuardStringDecoder.java
Created August 16, 2015 23:05
JEB Plugin for decrypt DexGuard encrypted Strings.
import jeb.api.IScript;
import jeb.api.JebInstance;
import jeb.api.ast.*;
import jeb.api.ast.Class;
import jeb.api.dex.Dex;
import jeb.api.dex.DexCodeItem;
import jeb.api.dex.DexFieldData;
import jeb.api.dex.DexMethod;
import jeb.api.ui.JavaView;
import jeb.api.ui.View;
@chiefy
chiefy / xrt500.keytable
Created July 18, 2015 18:00
Vizio XRT500 LIRC Keytable
# table: xrt500, type: NEC
0x444 KEY_OK
0x445 KEY_UP
0x446 KEY_DOWN
0x447 KEY_LEFT
0x448 KEY_RIGHT
0x449 KEY_EXIT
0x44a KEY_BACK
0x41c KEY_MENU
@robatron
robatron / fallout-3-macbook-intel-graphics-fix.md
Last active August 29, 2015 14:12
How to run Fallout 3 on MacBook Intel graphics chipsets

I had trouble getting Steam's version of Fallout 3 to work on my MacBook Pro in Windows. The main menu would start, but the game would crash after I clicked "play", just before the intro movie.

Turns out the issue was related to my MacBook's Intel graphics chipset, an Intel Iris Graphics 5100. To get FO3 to work, I was able to use the Intel HD Graphics Bypass package to trick FO3 into thinking it's running on an Nvidia chipset.

If you're running an Intel graphics chipset, and can't get FO3 to run, this fix may work for you too:

  1. Manually download and extract the Intel HD Graphics Bypass Package
  2. Copy d3d9x.dll --> C:\Program Files (x86)\Steam\steamapps\common\Fallout 3\
  3. (Optional) Create a backup copy of C:\users\$USERNAME\Documents\my games\Fallout3\FALLOUT.ini
  4. Copy FALLOUT.INI --> C:\users\$USERNAME\Documents\my games\Fallout3\
@nrc
nrc / tools.md
Last active March 8, 2025 06:01
Rust tooling

Rust developer tools - status and strategy

Availability and quality of developer tools are an important factor in the success of a programming language. C/C++ has remained dominant in the systems space in part because of the huge number of tools tailored to these lanaguages. Succesful modern languages have had excellent tool support (Java in particular, Scala, Javascript, etc.). Finally, LLVM has been successful in part because it is much easier to extend than GCC. So far, Rust has done pretty well with developer tools, we have a compiler which produces good quality code in reasonable time, good support for debug symbols which lets us leverage C++/lanaguge agnostic tools such as debuggers, profilers, etc., there are also syntax highlighting, cross-reference, code completion, and documentation tools.

In this document I want to layout what Rust tools exist and where to find them, highlight opportunities for tool developement in the short and long term, and start a discussion about where to focus our time an

@PeterAttardo
PeterAttardo / Shadow.java
Last active May 12, 2022 08:13
Android Shadow Drawing
package com.example.util.shadow;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Rect;
import android.graphics.drawable.GradientDrawable;
import android.view.View;
import static android.graphics.drawable.GradientDrawable.Orientation.LEFT_RIGHT;
import static android.graphics.drawable.GradientDrawable.Orientation.TOP_BOTTOM;
@grugq
grugq / gist:03167bed45e774551155
Last active April 15, 2025 11:22
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

@basham
basham / css-units-best-practices.md
Last active March 10, 2025 20:57
CSS Units Best Practices

CSS units

Recommendations of unit types per media type:

Media Recommended Occasional use Infrequent use Not recommended
Screen em, rem, % px ch, ex, vw, vh, vmin, vmax cm, mm, in, pt, pc
Print em, rem, % cm, mm, in, pt, pc ch, ex px, vw, vh, vmin, vmax

Relative units

Relative units

@shamil
shamil / mount_qcow2.md
Last active May 18, 2025 02:59
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@mcpherrinm
mcpherrinm / yolo.patch
Created June 3, 2014 05:58
Add YOLO support to rust
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 00c07ce..e691821 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -921,8 +921,9 @@ impl<'a> Parser<'a> {
return true
}
- if token::is_keyword(keywords::Unsafe, &self.token) ||
- token::is_keyword(keywords::Once, &self.token) {
@nikic
nikic / php_evaluation_order.md
Last active October 19, 2021 05:47
Analysis of some weird evaluation order in PHP

Order of evaluation in PHP

Yesterday I found some people on my [favorite reddit][lolphp] wonder about the output of the following code:

<?php

$a = 1;
$c = $a + $a++;