Skip to content

Instantly share code, notes, and snippets.

gulp = require 'gulp'
livereload = require 'gulp-livereload'
watch = require 'gulp-watch'
coffee = require 'gulp-coffee'
exec = require('child_process').exec
gulp.task 'watch', ->
watch glob: "app/public/.phrozn/**/*.twig", (files) ->
console.log "Executing 'phr up'"
exec 'cd app/public;phr up'
@josephj
josephj / gulpfile.coffee
Last active August 29, 2015 14:08
Development tools for developer portal project
################
# Dependencies
################
gulp = require 'gulp'
watch = require 'gulp-watch'
connect = require 'gulp-connect'
open = require 'gulp-open'
path = require 'path'
exec = require('child_process').exec
################
@josephj
josephj / .editorconfig
Last active August 29, 2015 14:08
Personal Project
root = true
[*]
end_of_line = LF
charset = utf-8
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
max_line_length = 80
{
// JSHint Default Configuration File (as on JSHint website)
//
// http://www.jshint.com/docs/options/
// https://github.com/jshint/jshint/blob/master/examples/.jshintrc
"maxerr" : 50, // {int} Maximum error before stopping
// Enforcing
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
#!/usr/bin/env php
<?php
$js_pattern = '/\.js$/';
$return = 0;
$exit_status = 0;
$output = array();
$matches = array('js' => array());
// Get aganist git version
exec('git rev-parse --verify HEAD 2> /dev/null', $output, $return);
# Constants
CSS_PATH = './src/assets/css/*.css'
JS_PATH = './src/assets/js/*.js'
SASS_PATH = './src/assets/css/*.sass'
OUTPUT_PATH = './src/assets/css'
HTML_PATH = './src/index.html'
HTTP_PORT = 8087
LIVERELOAD_PORT = 32718
# Gulp plugins
{
"disallowCommaBeforeLineBreak": true,
"disallowEmptyBlocks": true,
"disallowKeywordsOnNewLine": ["else"],
"disallowKeywords": ["with"],
"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineBreaks": true,
"disallowMultipleLineStrings": true,
"disallowNewlineBeforeBlockStatements": true,
"disallowOperatorBeforeLineBreak": true,
@josephj
josephj / .gitconfig
Last active August 29, 2015 14:20
Basic .gitconfig file
[alias]
st = status
br = branch
ci = commit
cp = cherry-pick
co = checkout
sub = submodule
[diff]
color = auto
# use pbcopy and pbpaste
# need preinstall the reattach-to-user-namespace 'brew install reattach-to-user-namespace'
#
#set-option -g default-command "reattach-to-user-namespace -l zsh"
bind C-c run "tmux show-buffer | reattach-to-user-namespace pbcopy"
bind C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
set -g default-shell /bin/zsh
# start window index of 1
set-option -g base-index 1
set-window-option -g pane-base-index 1
# You can make as many tabs as you wish...
project_name: sample
project_root: ~/Sites/sample
windows:
- editor: vim
- shell: git fetch
- console: rails c
- server: rails s -p 6500
- guard: sleep 1; guard
- log: tail -f log/development.log