Skip to content

Instantly share code, notes, and snippets.

Max Bigras mbigras

  • Standard Cognition
  • San Francisco, CA
Block or report user

Report or block mbigras

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mbigras
mbigras / .chunkwmrc
Created Apr 21, 2019
.chunkwmrc file for apple macbook pro 13 inch
View .chunkwmrc
#!/bin/bash
chunkc core::log_file stdout
chunkc core::log_level warn
chunkc core::plugin_dir /usr/local/opt/chunkwm/share/chunkwm/plugins
chunkc core::hotload 0
chunkc set window_float_topmost 0
chunkc set ffm_bypass_modifier fn
@mbigras
mbigras / .skhdrc
Created Apr 21, 2019
skhdrc file for apple macbook pro 13 inch
View .skhdrc
# chunkc tiling::window --grid-layout rows:cols:left:top:width:height
# 2560/20=128
# 1600/20=80
# note: ~/.chunkwmrc offset=20
# full
alt+cmd-f : id=$(chunkc tiling::query --window id); \
chunkc tiling::window --grid-layout 80:128:0:0:128:80; \
chunkc tiling::window --focus $id
@mbigras
mbigras / web-server.py
Last active Jul 15, 2018
Web server that returns a messaged based on the MSG environment variable
View web-server.py
#!/usr/bin/env python
# https://gist.github.com/bradmontgomery/2219997
"""
Usage::
MSG=foo ./web-server 8001
Send a GET request::
curl http://localhost:8001
"""
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
import os
@mbigras
mbigras / Build a macOS test environment with Homebrew.md
Last active Jun 7, 2018
Build a macOS test environment with Homebrew
View Build a macOS test environment with Homebrew.md

Build a macOS test environment with Homebrew

cat <<'EOF' > Vagrantfile
Vagrant.configure("2") do |config|
  config.vm.box = "emil-appunite/macos10.13-xcode9.0.1"
  config.vm.box_version = "1.0.0"
  config.vm.synced_folder ".", "/vagrant", disabled: true
  # https://github.com/jonschipp/vagrant/issues/3#issuecomment-138215720
  config.vm.provider "virtualbox" do |vb|
View some.sh
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="max_bigras@gap.com"
CORRECT_NAME="Max Bigras"
CORRECT_EMAIL="mbigras22@gmail.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
View gist:b215f08c7d78226d37fc1c7d8732316d
PATH
remote: .
specs:
kashmir (0.1.2)
GEM
remote: https://rubygems.org/
specs:
activemodel (4.2.10)
activesupport (= 4.2.10)
View singleton_class_exploration.rb
class Object
def speak
puts "hello from #{self.class.superclass}!"
end
end
class Foo
def speak
puts "hello from #{self.class}!"
super
View singleton_class_exploration.rb
class Foo
end
o = Foo.new
puts o.class
puts o.singleton_class.superclass
View some.rb
module WhereDidThisComeFrom
def confusing_method_that_sometimes_breaks
secret_sauce_private_method
end
private
def secret_sauce_private_method
msg = "Curse you aquascum!"
if rand(0..1) == 1
You can’t perform that action at this time.