Skip to content

Instantly share code, notes, and snippets.

View rmhall's full-sized avatar
👁️
Pondering the infinite…

Robert M. Hall rmhall

👁️
Pondering the infinite…
View GitHub Profile
@aras-p
aras-p / preprocessor_fun.h
Last active December 26, 2025 00:20
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,
@filmaj
filmaj / index.html
Created July 31, 2013 23:04
Off the ground with cordova camera in no time
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
<title>Hello World</title>
</head>
<body>
<div class="app">
@irazasyed
irazasyed / Install Composer using MAMP's PHP.md
Last active May 30, 2025 08:59
Instructions on how to change preinstalled Mac OS X PHP to MAMP's PHP Installation and then install Composer Package Management

Change default Mac OS X PHP to MAMP's PHP Installation and Install Composer Package Management


Instructions to Change PHP Installation


First, Lets find out what version of PHP we're running (To find out if it's the default version).

To do that, Within the terminal, Fire this command:

which php

@claus
claus / 1_flashplayer_telemetry_amf3_dump.txt
Last active December 19, 2015 12:38
Partial dump of AMF3 objects sent by the Flash Player over socket when ~/.telemetry.cfg is in place.
{"value":"3,2","__className":".value","name":".tlm.version"}
{"value":0,"__className":".value","name":".tlm.meta"}
{"value":1373361009100,"__className":".value","name":".tlm.date"}
{"value":"11,7,700,225","__className":".value","name":".player.version"}
{"value":"Plugin","__className":".value","name":".player.type"}
{"value":true,"__className":".value","name":".player.debugger"}
{"value":1373352885524,"__className":".value","name":".player.global.date"}
{"value":56,"__className":".value","name":".player.instance"}
{"value":20,"__className":".value","name":".player.scriptplayerversion"}
{"value":"&M=Adobe%20Macintosh&R=1440x900&COL=color&AR=1.0&OS=Mac%20OS%2010.8.4&ARCH=x86&L=en&PR32=t&PR64=t","__className":".value","name":".platform.capabilities"}
@stonehippo
stonehippo / remote_rpi.md
Last active December 21, 2017 01:16
Getting a Raspberry Pi set up for x11vnc and Bonjour (mDNS) access

Getting my Raspberry Pi set up

Getting on the network

Before the rest of this gist is useful, you've got to get your Raspberry Pi on the network. I followed the information from the Adafruint Learning System Raspberry Pi tutorials, which can be found at http://learn.adafruit.com/adafruits-raspberry-pi-lesson-3-network-setup.

Couple of additional network setup notes

The two files that are most important are

@addyosmani
addyosmani / headless.md
Last active November 21, 2025 21:40
So, you want to run Chrome headless.

Update May 2017

Eric Bidelman has documented some of the common workflows possible with headless Chrome over in https://developers.google.com/web/updates/2017/04/headless-chrome.

Update

If you're looking at this in 2016 and beyond, I strongly recommend investigating real headless Chrome: https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md

Windows and Mac users might find using Justin Ribeiro's Docker setup useful here while full support for these platforms is being worked out.

@alebianco
alebianco / SendBytes.java
Last active September 23, 2016 14:46
Work with ByteArray on an AIR Native Extension
/**
* Project: ANE-Google-Analytics
*
* Author: Alessandro Bianco
* Website: http://alessandrobianco.eu
* Twitter: @alebianco
* Created: 23/12/12 10.42
*
* Copyright © 2013 Alessandro Bianco
*/
@richieforeman
richieforeman / makeauthority.sh
Created July 23, 2012 21:38
Issue Your Own Self-Signed S/MIME Certs with OpenSSL
# Run this once
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@emilbjorklund
emilbjorklund / breakpoints_via_css.html
Created April 24, 2012 16:03
Width detection via sneaky CSS rules
<!DOCTYPE html>
<!--[if IE 8]> <html lang="sv-SE" class="no-js ie8"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="sv-SE" class="no-js"> <!--<![endif]-->
<head>
<meta charset="UTF-8">
<title>Breakpoint detection test</title>
<style type="text/css" media="screen">
@media screen and (min-width: 320px) {
#page:after {
content: 'smallest'; /* represent the current width-bracket */
@tkarpinski
tkarpinski / github_issues_to_csv.rb
Created April 12, 2012 18:09 — forked from henare/github_issues_to_csv.rb
Exports Github issues to CSV (API v3)
require 'octokit'
require 'csv'
require 'date'
# Github credentials to access your private project
USERNAME="USER_NAME"
PASSWORD="SEKRIT"
# Project you want to export issues from
USER="REPO_OWNER"
PROJECT="REPO_NAME"