Skip to content

Instantly share code, notes, and snippets.

View ambethia's full-sized avatar
🐼
PANDAS!

Jason L Perry ambethia

🐼
PANDAS!
View GitHub Profile
@joelstransky
joelstransky / bootstrap-breakpoints.html
Created November 12, 2014 19:49
Bootstrap 3 media query break-point visual debugger
<!-- media query debugger -->
<div class="navbar-fixed-top" style="right: initial">
<button type="button" class="btn btn-default visible-lg">Large</button>
<button type="button" class="btn btn-default visible-md">Medium</button>
<button type="button" class="btn btn-default visible-sm">Small</button>
<button type="button" class="btn btn-default visible-xs">Extra-Small</button>
</div>
<!-- end media query debugger -->
@victoralvarez84
victoralvarez84 / mindset.md
Last active August 29, 2015 14:27
Pre-work essay on based on the articles Fixed vs. Growth: The Two Basic Mindsets That Shape Our Lives by Maria Popova and What is Code by Paul Ford

Victor Alvarez

I have had a fixed mindset about many things, including tech. I have talked myself out of doing so many things because they are not a part of my self identification, be it learning how to code, cook, work out, or even let myself get angry in a healthy way. However, when I feeling confident or motivated, the growth mindset comes out. When I started to go to the gym last year, I wanted to learn and take in information, even if my ego had to be bruised a little. I wanted to learn how to code, even if I had to check wikipedia every five words. I still feel a little Fixed when in a way that it is hard for me to take criticism. I have to mentally prepare myself and even then, it’s tough. I get upset with how smug or overly confident someone with criticism can be. I project these thoughts and emotions on to the person.

I predict I will encounter difficulties with staying focused. I have trouble with that because I want to do a million things at once. I am not diagnosed with ADD but I act
@rtomayko
rtomayko / nightly-chromium
Created November 7, 2009 04:48
Fetch and install the latest Chromium mac nightly.
#!/bin/sh
# Fetch and install the latest Chromium mac nightly build, but only
# if it's different from the currently installed version. An existing
# Chromium.app is backed up to .Chromium.app in the same directory.
#
# Install with:
# $ curl -L http://bit.ly/night-chrome > ~/bin/nightly-chromium
# $ chmod +x ~/bin/nightly-chromium
#
# To upgrade to latest chromium version:
@mrinterweb
mrinterweb / update_chromium.sh
Created December 30, 2010 23:20
This is a script to update chromium to the nightly build for mac
#!/bin/bash
TMP_DIR=/tmp/chromedownload
BASE_URL=http://build.chromium.org/f/chromium/snapshots/chromium-rel-mac
rm -rf $TMP_DIR
mkdir $TMP_DIR
cd $TMP_DIR
curl $BASE_URL/LATEST -o $TMP_DIR/LATEST --silent && LATEST=`cat $TMP_DIR/LATEST`
echo "Latest build # $LATEST"
echo "downloading from: $BASE_URL/$LATEST/chrome-mac.zip"
curl $BASE_URL/$LATEST/chrome-mac.zip -o $TMP_DIR/chrome-mac.zip
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtq4sV9zglIqqkqCvhwdiOTZ2a6D3xhmBAJulHVLMrsD1QL0662R84iCi4VdMlvviKo1W0zk98pjvnQC4Q1KZJ1xmPPyq97pbZAipZR15MNqOS5R82Oo8+cpdQsJwdQBhA47OxpOKrju6AqxWg8Tz3m7Lda0iDa4woXNG8eMwIGCZ31iBFOMuz/aSWc92KZ3p6lqJw2C3H2H1h6291AfYRSnShF5wfYCQDjLupkhX6jq90u4cGcFrWJBgRPLs0Xkl4azNTlo4/dFMaI1jYI363K9ERk33tUsh4hqHTt8saDNo4+c+46Lv/5dmznsxkcei46yD9fTuB85pQMEFWILB0w== jasper@ambethia.com
@goatslacker
goatslacker / spaceship.coffee
Created October 7, 2011 08:01
creates an svg path for a spaceship based on Dave Bollinger's algorithm
# Based on Dave Bollinger`s work
class Spaceship
constructor: (@size = 5) ->
@ship = ( solid: [], cockpit: [], body: [] )
# map the ship
{ empty, solid, cockpit, body } = @map this
((rand().to_i)...rand((rand(5000).to_i))).send(Enumerable.instance_methods[rand(Enumerable.instance_methods.size)]) { rand(6) > 2 }
require 'benchmark'
n = 5_000_000
find = 4
array = [1,2,3,4]
Benchmark.bm do |x|
x.report { n.times { array.include?(4) } }
x.report { n.times { array.include?(5) } }
x.report { n.times { [1,2,3,4].include?(5) } }
@elcepi
elcepi / cgminer
Last active December 23, 2015 18:49
My cgminer init.d script using tmux
#! /bin/sh
### BEGIN INIT INFO
# Provides: cgminer
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts cgminer
# Description: Start script for cgminer
### END INIT INFO
@awwaiid
awwaiid / 01 hive.rb
Last active December 24, 2015 06:09
Everyone adds a line, one at a time!
#!/usr/bin/env ruby
if ARGV == ['who', 'is', 'this?']
puts "THIS IS SPARTA!!!"
end
puts (words = File.read('/usr/share/dict/words')).length
good_words = words.split.select {|w| w.size > 6}
puts good_words.sample(3).join(' ')
Thread.new{ STDERR.<< ", \n A PLAY IN 3 PARTS.\n\n============ PAGE " }
puts good_words.length
puts File.read(__FILE__).split.detect{|_| _ =~ /SPARTA/}