Skip to content

Instantly share code, notes, and snippets.

View rfischer20's full-sized avatar

Ryan Fischer rfischer20

View GitHub Profile
# Cleaning out android files
find / -size +1G | grep android
# Find largest files in fodlers
du -a projects/ | sort -n -r | head -n 5
# Apple storage delete
https://stackoverflow.com/questions/29930198/can-i-delete-data-from-ios-devicesupport
const SUBMIT_BUG = 'bugshift/SUBMIT_BUG';
const initialState = [];
export default function reducer(state = initialState, action = {}) {
const { type, payload } = action;
switch (type) {
case SUBMIT_BUG:
return [{
" Sampled from Gary Bernhardt's .vimrc file
" vim:set ts=2 sts=2 sw=2 expandtab:
call pathogen#incubate()
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" BASIC EDITING CONFIGURATION
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible
" allow unsaved background buffers and remember marks/undo for them
@rfischer20
rfischer20 / UsefulGitCommands
Created June 27, 2014 15:30
My useful git commands
# List branches sorted by date (with date)
git for-each-ref --sort=-committerdate refs/heads/ --format='%(committerdate:short) %(authorname) %(refname:short)'
@rfischer20
rfischer20 / gist:7462017
Created November 14, 2013 05:43
Modified version of Gary Bernhardt's .vimrc file
" Modified version of Gary Bernhardt's .vimrc file
" vim:set ts=2 sts=2 sw=2 expandtab:
call pathogen#incubate()
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" BASIC EDITING CONFIGURATION
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible
" allow unsaved background buffers and remember marks/undo for them
@rfischer20
rfischer20 / gist:4723977
Created February 6, 2013 16:55
Example files for How To Create An Admin Menu Using CSS on 20spokes' Blog http://www.20spokes.com/2013/02/how-to-create-an-admin-menu-using-css/
<html>
<head>
<link type="text/css" href="style.css" rel="stylesheet"/>
</head>
<body>
<ul class="submenu">
<li class="active">
<a href="overall" class="overall">
Overall
</a>
@rfischer20
rfischer20 / gist:2719591
Created May 17, 2012 15:17
Examples for Intro to Mongodb
//Check out the slides at https://speakerdeck.com/u/ryan_fischer/p/intro-to-mongodb
//create new document in collection, including an array and date
db.members.insert( {name:"Ryan", age: 29, skills: ["ruby", "mongodb"], created_at: new Date()});
//find created user
db.members.find({name:"Ryan"});
//update user
db.members.update( {name: "Ryan"}, {$set: {age: 28}}, 0, 0);
@rfischer20
rfischer20 / gist:2639659
Created May 8, 2012 21:49
String heredocs for inserting node content
add_comment = (data) ->
if data.state == "success"
html = """
<tr>
<td class='avatar'>
<img src='#{data.comment.avatar_url}'/>
</td>
<td>
<h4>#{data.comment.name}<h4>
<h5>#{data.comment.date}</h5>
@rfischer20
rfischer20 / place.rb
Created November 15, 2011 21:45
Geospatial Indexing with MongoDB and Ruby Driver Example
#Example queries using the MongoDB Ruby Driver not a pattern for development
require 'mongo'
class Place
attr_accessor :name, :_id, :dis
def initialize args={}
args.each do |k,v|