Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ericboehs's full-sized avatar

Eric Boehs ericboehs

  • Oddball
  • Enid, OK
  • 10:41 (UTC -05:00)
View GitHub Profile
@andyyou
andyyou / rails_webpacker_bootstrap_expose_jquery.md
Last active August 9, 2022 07:38
Rails 5.2 with webpacker, bootstrap, stimulus starter

Rails 5.2 with webpacker, bootstrap, stimulus starter

This gist will collects all issues we solved with Rails 5.2 and Webpacker

Create Project

# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@derwiki
derwiki / review-apps-postdeploy.sh
Created May 13, 2016 23:10
`postdeploy` script for Heroku Review Apps that replaces the default Postgres DB with a MySQL DB from ClearDB.
#!/app/bin/ruby
require 'platform-api'
cleardb_url = ENV['CLEARDB_DATABASE_URL']
if cleardb_url.nil? || cleardb_url == ''
puts "Error: CLEARDB_DATABASE_URL not set"
exit -1
end
@burke
burke / remotepaste.md
Last active September 26, 2023 11:04
This sets up keybindings in tmux that allow you to copy/paste to/from your OS X clipboard from tmux running inside an SSH connection to a remote host. Partially borrowed from http://seancoates.com/blogs/remote-pbcopy

Local (OS X) Side

~/Library/LaunchAgents/pbcopy.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
     <key>Label</key>
     <string>localhost.pbcopy</string>
@FokkeZB
FokkeZB / CROP.md
Created May 2, 2013 09:43
Image (cropping) CommonJS lib for Titanium

Often I need to display a user-provided picture in an ImageView in such a way that the whole ImageView is filled with as much of the picture possible.

This is how I do it:

var image = require('image');

Ti.Media.showCamera({
        mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO],
 success: function (e) {
@JEG2
JEG2 / tweet_oge_price_signal.rb
Created August 1, 2012 19:20
A simple bot for tweeting OGE's daily price signal
require "rest_client"
require "twitter"
URL = "http://www.oge.com/residential-customers/products-and-services/" +
"Positive-Energy-Smart-Grid/Pages/PriceSignal.aspx"
DATE_RE = Time.now.strftime("%A,\\s+%B\\s+%d,\\s+%Y")
unless ARGV.size == 4
abort "USAGE: #{$PROGRAM_NAME} CONSUMER_KEY CONSUMER_SECRET " +
"OAUTH_TOKEN OAUTH_TOKEN_SECRET"
#! /bin/bash
# Setup variables
USER=ericboehs
SSH_PUBLIC_KEY="ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEApqtopvozpyuX+ELj9a78eFY0AmU5Zl3V3l2n7XW49ZVszdJFGX6l3Lsb9tZW1zNSPtt9hDzh7m4R/y0l/Qxzitk0xcQWyuIFIIifiqY2ZFgEPXKcZ/i+6E1rQL8f44eLkgIH8evTB15TPcIefbdWHlhLXn7WoG/aboC9TzLgtUG05m2Mtp8/gDYI93cZHgK9hLsuQR/iSbt3obx6id2bB4MQSjPu7wPpjVbsn6pglbbjgkE9qkERckLDAUDuFQfJRQUMjbJ01Vnp6w0D6Ffg8kE3VFnBxNc4eZHS/nvPTTd35ZhCnnOIQ5brfTAoMpvctlfoh0fjaWhXJbny39CHow== ericboehs@Airic.local"
GITHUB_USER=$USER
GITHUB_KEY=abcdefg # <---- CHANGE ME
# Create an admin and rvm group
/usr/sbin/groupadd admin
@ericboehs
ericboehs / Fresh-Install.markdown
Last active July 24, 2023 08:16
What I do after a fresh install of Mac OS X
@soffes
soffes / install.markdown
Last active August 16, 2021 12:25
New computer setup

New Machine

Updated this for the first time in awhile in late 2020.

System Preferences

  • Enable iCloud
  • Disable iCloud mail
  • Display to medium
  • Turn up trackpad speed