A quick shell script function to create a directory following react-style-guide
# React component
rc () {
mkdir $1;
touch "$1/index.js";
echo "import React, { Component } from 'react';A quick shell script function to create a directory following react-style-guide
# React component
rc () {
mkdir $1;
touch "$1/index.js";
echo "import React, { Component } from 'react';Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist https://gist.github.com/kevinelliott/0726211d17020a6abc1f). Note that I expect this to change significantly as I install El Capitan several times.
I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.
This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.
You are encouraged to fork this and modify it to your heart's content to match your own needs.
| #!/bin/sh | |
| # Example usage | |
| # cd into directory that has @3x images | |
| # ./whatever-you-name-this.sh | |
| # Remember to chmod +x the script | |
| resize () { | |
| ls *@3x.png | awk '{print("convert "$1" -filter box -resize '$1' "$1)}' | sed 's/@3x/'$2'/2' | /bin/sh | |
| } |
| // Lua C API | |
| #include <lua.hpp> | |
| // C++ input/output streams | |
| #include <iostream> | |
| // MyObject as C++ class | |
| class MyObject{ | |
| private: | |
| double x; | |
| public: |
Last updated: 2017-03-18
exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .
###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs
| -- mathlib.lua | |
| --[[ | |
| Maths extension library for use in Corona SDK by Matthew Webster. | |
| All work derived from referenced sources. | |
| twitter: @horacebury | |
| blog: http://springboardpillow.blogspot.co.uk/2012/04/sample-code.html | |
| code exchange: http://code.coronalabs.com/search/node/HoraceBury | |
| github: https://gist.github.com/HoraceBury |
/<\?php\s(\/\*(?:[^*]|\n|(?:\*(?:[^\/]|\n)))*\*\/)\s/
Test in: http://www.rubular.com/
| //random game jam theme generator | |
| var LudumDareThemeList = [ | |
| "2030: The Year We Make Contact", | |
| "3D Glasses", | |
| "8 Eyes", | |
| "A (very) non-addictive game", | |
| "A day in the life of", | |
| "Aardvarks", | |
| "Abandoned", | |
| "Absolute", |
| var waitForEl = function(selector, callback) { | |
| if (jQuery(selector).length) { | |
| callback(); | |
| } else { | |
| setTimeout(function() { | |
| waitForEl(selector, callback); | |
| }, 100); | |
| } | |
| }; |
| #!/bin/sh | |
| # | |
| # Setup a work space called `work` with two windows | |
| # first window has 3 panes. | |
| # The first pane set at 65%, split horizontally, set to api root and running vim | |
| # pane 2 is split at 25% and running redis-server | |
| # pane 3 is set to api root and bash prompt. | |
| # note: `api` aliased to `cd ~/path/to/work` | |
| # | |
| session="work" |