Skip to content

Instantly share code, notes, and snippets.

Avatar

Jason Schein echochamber

View GitHub Profile
View gist:e3f521fef129a86b8d823d86860bbb79
RUST_BACKTRACE=1 cargo run --example gzip
Compiling reqwest v0.1.0 (file:///Users/jasonschein/Code/rust/reqwest)
warning: variable does not need to be mutable, #[warn(unused_mut)] on by default
--> examples/gzip.rs:12:9
|
12 | let mut client = reqwest::Client::new().unwrap();
| ^^^^^^^^^^
warning: variable does not need to be mutable, #[warn(unused_mut)] on by default
--> examples/gzip.rs:14:9
@echochamber
echochamber / gtk.css
Created Oct 24, 2016
Make Ubuntu GNOME Terminal Have A More Noticable "Active Tab"
View gtk.css
/* ~/.config/gtk-3.0/gtk.css */
TerminalWindow .notebook tab:active {
background-color: #F6BBA6;
}
View arc_example.rs
extern crate piston_window;
extern crate graphics;
extern crate piston;
use piston_window::*;
fn main() {
let opengl = OpenGL::V3_2;
let (width, height) = (800, 800);
View .bash_profile
export PATH="$(brew --prefix php55)/bin:$PATH"
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
function color_my_prompt {
local __default_color="\[\033[37m\]"
local __text_color="\[\033[0;37m\]"
View dotfiles.sh
#!/bin/sh
[[ -e ~/.dotfiles ]] || git clone git@github.com:sonots/.dotfiles.git ~/.dotfiles
pushd ~/.dotfiles
git submodule init
git submodule update
for i in `ls -a`
do
[ $i = "." ] && continue
View InstallVundle.sh
mkdir ~/.vim/
mkdir ~/.vim/swap/
mkdir ~/.vim/backup
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
@echochamber
echochamber / mac_PS1.sh
Last active Aug 29, 2015
Cool Bash Stuff
View mac_PS1.sh
function color_my_prompt {
local __default_color="\[\033[37m\]"
local __text_color="\[\033[0;37m\]"
local __user_and_host="\[\033[0;32m\]\u @ \h$__default_color"
local __cur_location="\[\033[0;36m\]\w$__default_color"
local __git_branch_color="\[\033[1;31m\]"
git --version 2>&1 >/dev/null # improvement by tripleee
GIT_IS_AVAILABLE=$?
if [ $GIT_IS_AVAILABLE -eq 0 ]; then
local __git_branch='`git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\\\\\1\/`'