Skip to content

Instantly share code, notes, and snippets.

View Jamp's full-sized avatar

Jaro Marval Jamp

View GitHub Profile
@voyeg3r
voyeg3r / keylog2.pl
Created May 4, 2011 17:41
Keylogger (linux)
#!/usr/bin/perl -w
# source: http://www.kirsle.net/blog/kirsle/building-a-better-keylogger
# keylog2 - a rootless keylogger that only requires an X server and the xinput
# command (provided by xorg-x11-apps on Fedora). You'll also need to install
# the Perl module IO::Pty::Easy.
#
# Unlike my first keylogger proof-of-concept, this one doesn't require root
# privileges because it just uses the X Window System. Therefore it only
# catches key inputs made to graphical programs on the same X server that the
@mathewbyrne
mathewbyrne / slugify.js
Created October 12, 2011 04:34
Javascript Slugify
function slugify(text)
{
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, ''); // Trim - from end of text
}
@siraj
siraj / build-essential.sh
Created November 28, 2011 05:56 — forked from henry0312/build-essential.sh
Build m4, autoconf, automake, libtool on Mac OS X Lion
#!/bin/sh
# 初期設定
WORK=$HOME/Builds/build-essential
PREFIX=$HOME/local
export PATH="$PREFIX/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
# ソースコードのダウンロード
if [ ! -d $WORK/src ] ; then
mkdir src
@simenbrekken
simenbrekken / firebase-auth-deferred.js
Created March 13, 2013 12:47
Easier Firebase authentication with jQuery Deferred
var db = new Firebase('https://demo.firebaseio.com')
var authenticate = (function(db) {
var loggedIn,
deferred = $.Deferred()
var client = new FirebaseAuthClient(db, function(err, user) {
loggedIn = !!user
if (err) {
@guerrerocarlos
guerrerocarlos / enviar_tweet_libturpial.py
Last active December 18, 2015 21:29
Ejemplo sencillo de envío de un mensaje utilizando Libturpial. Incluye registro de la cuenta
# -*- coding=utf-8 -*-
from libturpial.api.models.account import Account
from libturpial.api.core import Core
c = Core()
cuenta = "guerrerocarlos-twitter"
mensaje = "Probando desde libturpial"
cuentas_registradas = c.list_accounts()
print "Cuentas registradas: ",cuentas_registradas,"\n"
anonymous
anonymous / gist:6133671
Created August 1, 2013 17:56
Script para mostrar los procesos que ocupan la memoria SWAP en Linux
for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done
@thomasfr
thomasfr / iptables.sh
Last active April 13, 2024 01:59
iptable rules to allow outgoing DNS lookups, outgoing icmp (ping) requests, outgoing connections to configured package servers, outgoing connections to all ips on port 22, all incoming connections to port 22, 80 and 443 and everything on localhost
#!/bin/bash
IPT="/sbin/iptables"
# Server IP
SERVER_IP="$(ip addr show eth0 | grep 'inet ' | cut -f2 | awk '{ print $2}')"
# Your DNS servers you use: cat /etc/resolv.conf
DNS_SERVER="8.8.4.4 8.8.8.8"
# Allow connections to this package servers
@andrewn
andrewn / Readme.md
Last active August 29, 2015 14:08
RFID reader
@raucao
raucao / nginx-lua-s3.nginxconf
Last active September 8, 2020 01:29
Nginx proxy to S3
location ~* ^/s3/(.*) {
set $bucket '<REPLACE WITH YOUR S3 BUCKET NAME>';
set $aws_access '<REPLACE WITH YOUR AWS ACCESS KEY>';
set $aws_secret '<REPLACE WITH YOUR AWS SECRET KEY>';
set $url_full "$1";
set_by_lua $now "return ngx.cookie_time(ngx.time())";
set $string_to_sign "$request_method\n\n\n\nx-amz-date:${now}\n/$bucket/$url_full";
set_hmac_sha1 $aws_signature $aws_secret $string_to_sign;
set_encode_base64 $aws_signature $aws_signature;
@dmytrodanylyk
dmytrodanylyk / res_color_btn_flat_selector.xml
Last active March 4, 2023 07:52
Material Flat Button Style
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false"
android:color="@color/flat_disabled_text"/>
<item android:color="@color/flat_normal_text"/>
</selector>