Skip to content

Instantly share code, notes, and snippets.

Josh Teneycke jteneycke

Block or report user

Report or block jteneycke

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
@jteneycke
jteneycke / ec
Created Feb 26, 2017 — forked from alexmurray/ec
Start Emacs Client in GUI (and launch Emacs server if not already running)
View ec
#!/bin/bash
# Shamelessly taken from http://mjwall.com/blog/2013/10/04/how-i-use-emacs/
# This script starts emacs daemon if it is not running, opens whatever file
# you pass in and changes the focus to emacs. Without any arguments, it just
# opens the current buffer or *scratch* if nothing else is open. The following
# example will open ~/.bashrc
# ec ~/.bashrc
@jteneycke
jteneycke / ec
Created Feb 26, 2017 — forked from alexmurray/ec
Start Emacs Client in GUI (and launch Emacs server if not already running)
View ec
#!/bin/bash
# Shamelessly taken from http://mjwall.com/blog/2013/10/04/how-i-use-emacs/
# This script starts emacs daemon if it is not running, opens whatever file
# you pass in and changes the focus to emacs. Without any arguments, it just
# opens the current buffer or *scratch* if nothing else is open. The following
# example will open ~/.bashrc
# ec ~/.bashrc
View google_calendar_api_example.rb
#gem install 'google-api-client'
require 'google/api_client'
#Setup auth client
client_secrets = Google::APIClient::ClientSecrets.load #client_secrets.json must be present in current directory!
auth_client = client_secrets.to_authorization
auth_client.update!(
:scope => 'https://www.googleapis.com/auth/calendar',
:access_type => "offline", #will make refresh_token available
@jteneycke
jteneycke / Gemfile
Created Feb 15, 2017 — forked from ejholmes/Gemfile
Sample Force.com Sinatra app.
View Gemfile
source :rubygems
gem 'sinatra', '~> 1.3.3'
gem 'json', '~> 1.7.5'
gem 'restforce', '~> 1.0.5'
gem 'thin', '~> 1.5.0'
group :development do
gem 'shotgun', '~> 0.9'
gem 'tunnels', '~> 1.2.2'
View term-config.vim
" Window split settings
highlight TermCursor ctermfg=red guifg=red
set splitbelow
set splitright
" Terminal settings
tnoremap <Leader><ESC> <C-\><C-n>
" Window navigation function
" Make ctrl-h/j/k/l move between windows and auto-insert in terminals
View bootstrap-gallery-with-modal-and-carousel.markdown
View hamlize
#!/usr/bin/env ruby
require "pry"
def command?(name)
`which #{name}`
$?.success?
end
htmls = `find . -type f -name \*.html`.split("\n")
@jteneycke
jteneycke / Makefile
Created Aug 8, 2016 — forked from rtorr/Makefile
Watch elm files for changes and then recompile
View Makefile
js = $(shell echo $(elm) | tr A-Z a-z)
elm = Main
# Example: make elm=Main js=main watch
watch:
echo "watching *.elm files, outputing $(js).js" && fswatch -0 *.elm | xargs -0 -n 1 -I \{\} elm-make $(elm).elm --output $(js).js
# Example: make elm=Main js=main build
build:
elm-make $(elm).elm --output $(js).js
View so-35028430.elm
import Html exposing (..)
import Html.App exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Html.Attributes exposing (..)
import Http
import Task exposing (Task)
import Json.Decode as Json exposing ((:=))
type Msg
View object_and_module_grapher.rb
# jEdit :folding=explicit:collapseFolds=1:indentSize=2:tabSize=2:
# add requires here #{{{
#}}}
# handle command line #{{{
def usage #{{{
puts <<-USAGE
You can’t perform that action at this time.