Skip to content

Instantly share code, notes, and snippets.


Joshua Perry joshperry

View GitHub Profile
# Clean from standard vim
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common
# Vim dependency
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev libperl-dev libncurses5-dev ruby-dev
# if you want gVim add also this
sudo apt-get install libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev
# Clean and prepare folders
sudo rm -rf /usr/local/share/vim
View gettag.js
// Grab the ComType tag
const getTag = (product, tag) =>
.find(t => t.startsWith(`${tag}=`))
const keyMatches = key => compose(equals(Just(key)))(head)
const getTagf = (product, tag) =>
joshperry / strace.log
Created May 24, 2017
Strace log of dnsmaq starting with dnsmasq.leases hosted on an nfs mount
View strace.log
open("/dev/urandom", O_RDONLY) = 3
read(3, "L+M\212\37K\r9\37\267\305\25\30\2\341\261\31%\25146\262\17\210%\326\320\3658V\261\7"..., 128) = 128
read(3, "\t0\214\6\227\263P#=\373\305\237\313d\251\36V\357h\323\227u\254\\\274m\214\27\205\276\23\206"..., 48) = 48
close(3) = 0
open("/etc/dnsmasq.conf", O_RDONLY) = 3
readv(3, [{"", 0}, {"# Configuration file for dnsmasq"..., 1024}], 2) = 1024
readv(3, [{"", 0}, {"sec\n\n# Replies which are not DNS"..., 1024}], 2) = 1024
readv(3, [{"", 0}, {"# servers it knows about and tri"..., 1024}], 2) = 1024
readv(3, [{"", 0}, {"elow send any host in double-cli"..., 1024}], 2) = 1024
readv(3, [{"", 0}, {"interface=\n# Or you can specify "..., 1024}], 2) = 1024
# Requirements for both hosts: bash, ssh, netcat
TMPDIR=$(mktemp -d)
trap 'rm -rf "$TMPDIR"' EXIT INT TERM HUP
View sc16is752-spi.dts
// Definitions for SC16IS750 UART on spi0.0
/ {
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
/* disable spi-dev for spi0.0 */
fragment@0 {
target = <&spi0>;
__overlay__ {

Carwings JSON API Protocol

This protocol is a much simpler interface to the Carwings telematics information. The original protocol was an XML SOAP API and was a bit of a pain to work with.

Every operation is executed as a simple HTTP GET request and responds with JSON documents. Parameters for the operation are encoded on the querystring.

The only operation that requires any kind of credentials is the User Login operation. All other operations take the DCMID and the VIN of your vehicle as parametersfor authorizing the requested operation.

All of the responses documents have a message and status property to signal operation success/failure messages and status. The status seems to mirror the HTTP reponse code and message seems to be "success" for successful operations.

View gulpfile.js
var gulp = require('gulp');
var sass = require('gulp-sass');
var minifyCss = require('gulp-minify-css');
var sourceMaps = require('gulp-sourcemaps'),
path = require('path');
gulp.task('styles', function() {
var designBase = 'src/main/resources/jcr_root/etc/slick/designs/';
gulp.src('**/scss/*.scss', { base: designBase })
View profileMenu.scss
$dropdown-transition-duration: 200ms;
@mixin pdk-transition($duration, $type) {
-webkit-transition: all $duration $type;
-moz-transition: all $duration $type;
-o-transition: all $duration $type;
transition: all $duration $type;
@mixin profilemenu-animate($height, $width, $border-color:gainsboro, $box-shadow-color: #e6e6e6){
joshperry / _grid.scss
Last active Sep 15, 2015 — forked from auniverseaway/_grid.scss
Flexbox Grid System
View _grid.scss
@mixin grid($count) {
display: flex;
// Add Gutters
&.Gutter {
margin: -1em 0 0 -1em;
>.Cell {
padding: 1em 0 0 1em;
View gist:174fcc39006d324ff17e
var Promise = require('bluebird');
var someAsyncFunction = Promise.promisify(someFunction);
function one() {
return someAsyncFunction(params)
.then(function one(results) {
You can’t perform that action at this time.