Skip to content

Instantly share code, notes, and snippets.

View ajsb85's full-sized avatar
🖼️
Engaging cognitive processors...

Alexander Salas Bastidas ajsb85

🖼️
Engaging cognitive processors...
View GitHub Profile
@michaelcurry
michaelcurry / rfc-template.md
Created September 29, 2016 18:07
RFC Template [Markdown]

RFC Template

Feature Name: (fill me in with a unique identity, myawesomefeature)

Type: (feature, enhancement)

Start Date: (fill me in with today's date, YYYY-MM-DD)

Author: (your names)

@jcready
jcready / integration.async.await.js
Last active May 13, 2017 17:35
Node.js example of GitHub Integration auth process
// With async/await support
const fs = require('fs')
const jwt = require('jwt-simple')
const pem_file = '/path/to/github.pem' // the absolute path to your Application Pem Certificate issued by GitHub
const integration_id = 0 // GitHub Application Integration ID
const installation_id = 0 // once installed on an organization. The Organization Integration ID
const expire_seconds = 60 // number of seconds the jwt token expires (max ~600 but not designated by GitHub)
const slug = 'owner/repo' // name of repo for demo purposes
const privateKey = fs.readFileSync(pem_file)
@dotcypress
dotcypress / keybase.md
Last active January 6, 2017 18:36
My publicly-auditable identity

Keybase proof

I hereby claim:

  • I am dotcypress on github.
  • I am dotcypress (https://keybase.io/dotcypress) on keybase.
  • I have a public key whose fingerprint is 9F83 5882 AEEA B17D B12C 78DE D844 1EF8 F3DF 1924

To claim this, I am signing this object:

@jmpinit
jmpinit / Dockerfile
Created August 24, 2016 20:58
Example of cross-compiling Rust for ARMv7.
FROM ubuntu
MAINTAINER Owen Trueblood
# general dependencies
RUN apt-get install -y curl
# install target toolchain
RUN apt-get update --fix-missing
RUN apt-get install -y build-essential gcc-arm-linux-gnueabihf
@ajsb85
ajsb85 / ArmaditoAV-REST-API.postman_collection.json
Last active August 10, 2016 08:47
ArmaditoAV REST API v0.1 POSTMAN Collection v2
{
"variables": [],
"info": {
"name": "ArmaditoAV REST API",
"_postman_id": "df112ab6-1ff5-dbf4-81e9-e19e2822ffe8",
"description": "This POSTMAN collection documents the first version of the Armadito antivirus\nAPI that can be used by any client application to query antivirus status,\nlaunch a scan, get events....\n\n## User agent\n\nAll API paths require a 'User-Agent' HTTP header. If no 'User-Agent' is present,\na HTTP error `403` (request forbidden) will be returned.\n\nNo check is performed on the User-Agent string, so any non-empty string can\nbe used.\n\n## Session token\n\nAll API paths (except of course the '/api/register') require a session token\nthat is generated by Armadito API.\n\nThe session token must be passed in HTTP header 'X-Armadito-Token'.\n\nTo get a session token, you must first make a GET request to path '/api/register'.\nIf request is valid, it will return a JSON object containing a valid token:\n```json\n{\n \"token\": \"485994620463561099\"\n}\n```\n\nThe token is a string
@jnewc
jnewc / i2c_test.c
Last active September 30, 2024 02:49
i2c analog stick driver
/*
* i2c_test.c
*/
#include <linux/slab.h> /* kzalloc */
#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* KERN_INFO */
#include <linux/timer.h> /* timer_list */
#include <linux/workqueue.h> /* schedule_work */
@ajsb85
ajsb85 / audioscrobbler.json
Created May 2, 2016 10:43
AudioScrobbler
{
"recenttracks": {
"track": [
{
"artist": {
"#text": "Aaron Gardea",
"mbid": ""
},
"name": "Daft Punk - Instant Crush",
"streamable": "0",
var funcArray_1 = [];
var funcArray_2 = [];
//IIFE of type 1
for (var i = 0; i < 10; i++) {
funcArray_1.push(function(val){
return function() { console.log(val); }
}(i));
}
console.log(i); // 10
@ajsb85
ajsb85 / webhook-transifex.json
Created April 6, 2016 02:38
Transifex Web Hook
{
"body": "project=odms-website\u0026resource=en-usproperties\u0026language=es\u0026reviewed=100",
"files": [
],
"form": {
"language": [
"es"
],
"project": [
@bmhatfield
bmhatfield / .profile
Last active August 9, 2025 20:28
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else