Skip to content

Instantly share code, notes, and snippets.

View 0xae's full-sized avatar
🏠
Working from home

ayrton 0xae

🏠
Working from home
View GitHub Profile
@need12648430
need12648430 / gist:0fb5825c4268b988166e
Created June 21, 2014 08:30
HTTP requests parsed in 4 lines of Lua.
local verb, resource, version, headers, body = data:match("(.+)%s+(.+)%s+(HTTP/%d%.?%d?)\r\n(.-)\r\n\r\n(.-)")
headers:gsub("(.-)%s*:%s*(.-)\r\n", function(name, value)
-- do something with name and value here
end)
@swarminglogic
swarminglogic / enterpass.sh
Last active May 9, 2016 15:55
Fills out username/password. Triggered by global hotkey. Application agnostic. Determines best user/pass match from process information. Requiers userpass.sh (https://gist.github.com/swarminglogic/40922ce92e49aae3b2ca)
#!/bin/bash
# Use this with a global hotkey to the following: gksudo [FULLPATH]/enterpass.sh
if [[ $EUID -ne 0 ]] ; then
notify-send "This script must be run as root"
exit
fi
if ! command -v userpass > /dev/null ; then
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active May 9, 2024 03:03
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git
window.localforage.getItem('context')
.then(function(result){
console.log('-- Result ---');
console.log(result);
}, function(err){
console.log('--- Error ---');
console.log(err);
})
<span class="item-note">
<!-- {{sample.values[5]}} -->
<button class="button button-clear" ng-class="sample.sync ? 'button-balanced' : 'button-assertive'" style="min-height:21px;" ng-click="syncData(e);">
<i class="icon ion-paper-airplane"></i>
</button>
</span>
@joyrexus
joyrexus / README.md
Last active January 21, 2024 21:51 — forked from btoone/curl.md
curl tutorial

An introduction to curl using GitHub's API.

Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin

Includes HTTP-Header information in the output

/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
@danprince
danprince / index.html
Last active August 29, 2015 14:25
Tile Memory Test
<!DOCTYPE html>
<html>
<head>
<!-- Object Format Tests -->
<script src='tiles.js'></script>
<!-- Binary Format Tests -->
<!--<script src='tiles-binary.js'></script>-->
</head>
<body>
</body>
@jlnt
jlnt / keybase.md
Created September 3, 2015 22:41
Keybase proof

Keybase proof

I hereby claim:

  • I am jlnt on github.
  • I am jln (https://keybase.io/jln) on keybase.
  • I have a public key whose fingerprint is 435F DF34 816E FEC6 8624 F738 45DF EE86 2B49 4F88

To claim this, I am signing this object: