Skip to content

Instantly share code, notes, and snippets.

View Slumber86's full-sized avatar
πŸ“Έ

Agostino Marzotta Slumber86

πŸ“Έ
View GitHub Profile
@germboy
germboy / WebBrowserHelper.cs
Created May 4, 2012 18:19
WebBrowserHelper file for disabling WP7 pinch/zoom & scroll-snapback
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using LinqToVisualTree;
using Microsoft.Phone.Controls;
namespace App.Util
{
/// <summary>
@aras-p
aras-p / preprocessor_fun.h
Last active May 3, 2025 13:47
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@scottyab
scottyab / SignatureCheck.java
Last active October 7, 2024 22:46
Simple Android signature check. Please note: This was created in 2013, not actively maintained and may not be compatible with the latest Android versions. It's not particularly difficult for an attacker to decompile an .apk, find this tamper check, replace the APP_SIGNATURE with theirs and rebuild (or use method hooking to return true from `vali…
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.Signature;
public class TamperCheck {
//we store the hash of the signture for a little more protection
private static final String APP_SIGNATURE = "1038C0E34658923C4192E61B16846";
@plentz
plentz / nginx.conf
Last active May 3, 2025 05:27
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@staltz
staltz / introrx.md
Last active May 6, 2025 07:45
The introduction to Reactive Programming you've been missing
@ksol
ksol / chrome_39.js
Last active July 10, 2021 13:37
Language detection in javascript
window.navigator.language // -> "fr"
window.navigator.languages // -> ["fr-FR", "fr", "en-US", "en", "es", "de"]
window.navigator.userLanguage // -> undefined
window.navigator.browserLanguage // -> undefined
window.navigator.systemLanguage // -> undefined
@DorianRudolph
DorianRudolph / LICENSE.txt
Last active April 8, 2025 19:51
Arduino PS2 to USB HID Keyboard Converter
Copyright (c) 2015, Dorian Rudolph
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
@potatosalad
potatosalad / jwk_ed25519.json
Last active June 28, 2019 10:14
Example keys for JOSE.JWS documentation https://hexdocs.pm/jose
{
"crv": "Ed25519",
"d": "VoU6Pm8SOjz8ummuRPsvoJQOPI3cjsdMfUhf2AAEc7s",
"kty": "OKP",
"x": "l11mBSuP-XxI0KoSG7YEWRp4GWm7dKMOPkItJy2tlMM"
}
@acamino
acamino / README.md
Last active April 13, 2025 14:19
Shortcuts to Improve Your Bash & Zsh Productivity

Shortcut β€” Action

  • CTRL + A β€” Move to the beginning of the line
  • CTRL + E β€” Move to the end of the line
  • CTRL + [left arrow] β€” Move one word backward (on some systems this is ALT + B)
  • CTRL + [right arrow] β€” Move one word forward (on some systems this is ALT + F)
  • CTRL + U β€” (bash) Clear the characters on the line before the current cursor position
  • CTRL + U β€”(zsh) If you're using the zsh, this will clear the entire line
  • CTRL + K β€” Clear the characters on the line after the current cursor position
  • ESC + [backspace] β€” Delete the word in front of the cursor
@emadb
emadb / eslint.config.js
Last active October 28, 2016 14:21
My Eslint configuration
{"rules": {
// https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb
/* best practices */
"accessor-pairs": 0,
// enforces return statements in callbacks of array's methods
// http://eslint.org/docs/rules/array-callback-return
"array-callback-return": 2,
// treat var statements as if they were block scoped
"block-scoped-var": 2,
// specify the maximum cyclomatic complexity allowed in a program