Skip to content

Instantly share code, notes, and snippets.

View mhulet's full-sized avatar

xMike mhulet

  • Earth
View GitHub Profile
@mhulet
mhulet / application.coffee
Last active July 20, 2022 16:18
Webpack with CoffeeScript loader
# app/javascript/packs/application.coffee
import 'selectize/dist/css/selectize.default'
import 'ladda/dist/ladda-themeless.min'
import 'jquery'
import 'foundation-sites'
import * as Ladda from 'ladda'
import '../src/js/init'
import '../src/js/app.draggable_images'
@mhulet
mhulet / Preferences.sublime-settings
Created May 22, 2017 14:41
Sublime Text user preferences
{
"color_scheme": "Packages/User/SublimeLinter/base16-ocean.dark (SL).tmTheme",
"default_line_ending": "unix",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"font_size": 15,
"highlight_line": true,
"index_exclude_patterns": ["*.log", "tmp/**", "bower_components/**", "node_modules/**"],
"ignored_packages":
[
@mhulet
mhulet / Widget CSS
Created May 1, 2017 04:59
Helpman widget with Intercom (side-by-side)
/* Add this AT THE END of the CSS defined on your 'Widget' page */
#helpman-button {
display: none;
}
#helpman-iframe-container {
right: 400px;
height: calc(100% - 20px - 75px - 20px) !important;
max-height: 590px !important;
@mhulet
mhulet / 20170305194935_add_kustomer_id_to_users.rb
Created March 6, 2017 12:48
Add Kustomer to a Rails 4 app with existing users
# db/migrate/20170305194935_add_kustomer_id_to_users.rb
class AddKustomerIdToUsers < ActiveRecord::Migration
def change
add_column :users, :kustomer_id, :string
end
end
@mhulet
mhulet / algolia.rb
Created February 27, 2017 20:19
Rails 4 / Algolia setup for indexing a model
# config/initializers/algolia.rb
AlgoliaSearch.configuration = {
application_id: ENV["ALGOLIA_APPLICATION_ID"],
api_key: ENV["ALGOLIA_ADMIN_API_KEY"]
}
@mhulet
mhulet / application.rb
Last active January 19, 2017 14:11
Liquid syntax validator
# config/application.rb
# ...
module AppName
# ...
config.autoload_paths << Rails.root.join("validators")
# ...
end

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname