Skip to content

Instantly share code, notes, and snippets.

View spideynn's full-sized avatar
🦆

Kevin spideynn

🦆
View GitHub Profile
@mtigas
mtigas / gist:952344
Last active June 20, 2024 11:22
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes:

@agaricusb
agaricusb / gist:4575843
Created January 19, 2013 23:42
fernflower 0.8.6 cA NPE patch (fix for missing classes)
--- a/cA.java
+++ b/cA.java
@@ -234,7 +234,7 @@ public final class cA {
private aJ a(aK var1, cX var2, aG var3) {
aK var5 = (aK)aD.f().a().get(var3.g());
String var4 = cP.a(var3.k(), var3.h());
- if(var5.h.containsKey(var4) && (var4 = (String)var5.i.get(var4)) != null && var4.length() > 0) {
+ if(var5 != null && var5.h != null && var5.h.containsKey(var4) && (var4 = (String)var5.i.get(var4)) != null && var4.length() > 0) {
if(!a(var1, var5)) {
return null;
@estebanpadilla
estebanpadilla / AutoSnap.cs
Last active April 10, 2021 21:27
Auto snap to grid in Unity If you need to auto snap a gameObject to the grid in unity this script will help you. Usage: Create a Editor folder in your assets folder. Add the AutoSnap.cs script to the Editor folder. To open press Command + L (Mal), Control + L (PC) Source: http://answers.unity3d.com/questions/148812/is-there-a-toggle-for-snap-to-…
using UnityEngine;
using UnityEditor;
public class AutoSnap : EditorWindow
{
private Vector3 prevPosition;
private bool doSnap = true;
private float snapValue = 1;
[MenuItem( "Edit/Auto Snap %_l" )]
@Artanis
Artanis / minecraft-ultimate-tool-set.rst
Last active September 26, 2021 03:21
Crazy items in Minecraft.

Minecraft Ultimate Tool Set

Requires creative mode or operator power on a multiplayer server. On a single player game (survival or hardcore), you will need "cheats" enabled to move into creative mode. Don't forget to leave creative mode when done.

These items might be stupid. Be prepared to repair the country-side.

@wmealing
wmealing / C-states.md
Last active May 17, 2024 07:53
What are CPU "C-states" and how to disable them if needed?

To limit a CPU to a certain C-state, you can pass the processor.max_cstate=X option in the kernel line of /boot/grub/grub.conf.

Here we limit the system to only C-State 1:

    kernel /vmlinuz-2.6.18-371.1.2.el5 ... processor.max_cstate=1

On some systems, the kernel can override the BIOS setting, and the parameter intel_idle.max_cstate=0 may be required to ensure sleep states are not entered:

// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');
@fnuecke
fnuecke / bios.lua
Created December 24, 2014 00:35
Primitive remote code execution via OC network
local m=component.proxy(component.list("modem")())
m.open(2412)
local function respond(...)
local args=table.pack(...)
pcall(function() m.broadcast(2412, table.unpack(args)) end)
end
local function receive()
while true do
local evt,_,_,_,_,cmd=computer.pullSignal()
if evt=="modem_message" then return load(cmd) end
@mariotaku
mariotaku / .travis.yml
Last active August 8, 2018 13:10
Sign and upload compiled apk to Github releases automatically using Travis CI
language: android
android:
components:
# Uncomment the lines below if you want to
# use the latest revision of Android SDK Tools
- platform-tools
- tools
# The BuildTools version used by your project
- build-tools-22.0.0
@dergraf
dergraf / vernemq_grafana.json
Created October 16, 2015 14:38
VerneMQ Grafana Single Node Dashboard
{
"id": 1,
"title": "VerneMQ",
"originalTitle": "VerneMQ",
"tags": [],
"style": "dark",
"timezone": "browser",
"editable": true,
"hideControls": false,
"sharedCrosshair": false,
@lopspower
lopspower / README.md
Last active August 20, 2023 09:32
How to Analyze & Manage Memory on Android Like a Boss

Analyze & Manage Memory on Android Like a Boss

This Blog is all about memory management in Android. It provides information about how you can analyze & reduce memory usage while developing an Android app.

Memory management is a complex field of computer science and there are many techniques being developed to make it more efficient. This guide is designed to introduce you to some of the basic memory management issues that programmers face.

Memory Management in Android

Android is a Linux based operating system. It uses native open source C libraries which power Linux machines. All the basic operating system operations like I/O, memory management and so on are handled by the Linux kernel. Like Java and .NET, Android uses its own run time and virtual machine to manage application memory. Unlike either of these frameworks, the Android run time also manages the lifetime processes. Each Android application runs in a separate process within its own Dalvik instance, relinquishing all responsibility for memo