Skip to content

Instantly share code, notes, and snippets.

View itsthatguy's full-sized avatar
✌️
Love.

Kevin Altman itsthatguy

✌️
Love.
View GitHub Profile
import React, {PureComponent} from 'react';
// I've setup webpack to use relative paths from the src/ directory
import Results from 'Results';
import SearchBar from 'SearchBar';
// What is a PureComponent?
class Layout extends PureComponent {
// constructor receives props
// should we explain props?
def conditional_names(*args)
# puts params.is_a?(String)
classes = []
args.each do |arg|
classes << arg if arg.is_a?(String)
if arg.is_a?(Array)
classes << conditional_names(*arg)
end
let firstCollection = [
{id: 1, name: 'dog', item_id: 47},
{id: 2, name: 'truck', item_id: 38},
{id: 3, name: 'martian', item_id: 123}
];
let secondCollection = [
{id: 123, name: 'martian'}
];
StartX=1405
StartY=560
SizeX=50
SizeY=50
ClickOffset=15
itemF1_1 := {x: 10, y: 3}
itemF1_2 := {x: 10, y: 5}
return
module.exports = {
data: [
{
title: 'Conversational',
demo_url: './assets/media/DonovanCorneetz_UrbanDemo.mp3',
type: 'audio/mpeg'
},
{
title: 'Urban',
demo_url: 'http://www.donovanvo.com/Media/DonovanCorneetz_ConversationalDemo.mp3',
@itsthatguy
itsthatguy / dosh.sh
Last active August 29, 2015 14:22 — forked from bigtiger/dosh.sh
dosh() {
if [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "help" ]
then
read -r -d '' VAR << EOM
Usage: dosh [argument]
Arguments:
ls (default) lists running containers
[name|id] runs bash for specified container
help, -h, --help brings up this help
@itsthatguy
itsthatguy / foo.js
Created May 16, 2015 04:36
run: node foo.js
var exec = require('child_process').execFileSync;
var file = 'C:\\Program Files\\AutoHotkey\\AutoHotkey.exe';
exec(file, ['test.ahk', 'Hey Dawg']);
var gulp = require('gulp');
// Grab all the gulp plugins automagically for us to use below
var $ = require('gulp-load-plugins')({
pattern: ['gulp-*', 'del', 'main-bower-files']
});
// Swab the deck!
gulp.task('clean', function() {
return $.del.sync('dist/**/*');

Relative numbers in vim when in normal mode, and absolute in insert mode

autocmd InsertEnter * :set relativenumber! number
autocmd InsertLeave * :set number! relativenumber

Relative line snafu:

Yank the line 10 up from your cursor with :-10y

module.exports = {
right: [
{
id: "1",
name: "Saw Cleaver",
requirements: {
strength: 14,
skill: 12,
bloodtinge: 0,
arcane: 0