This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM Subversion pre-commit hook for Windows machine | |
REM put this in your SVN repository folder /hooks/pre-commit.bat | |
REM we use it with svn version | |
REM http://stackoverflow.com/questions/869248/windows-pre-commit-hook-for-comment-length-subversion | |
@echo off | |
:: Stops commits that have empty log messages. | |
@echo off | |
setlocal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# From http://tech.serbinn.net/2010/shell-script-to-create-ramdisk-on-mac-os-x/ | |
# | |
ARGS=2 | |
E_BADARGS=99 | |
if [ $# -ne $ARGS ] # correct number of arguments to the script; | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env/bash | |
# reformat json: read filename and write it again in the same name | |
# | |
# read JSON file and save it again reformatted | |
# | |
# usage: | |
# `reformat my.json` | |
reformat(){ | |
node -e " | |
var fs = require('fs') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to make opened Markdown files always be soft wrapped: | |
# | |
# path = require 'path' | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FILE=/etc/yum.repos.d/nginx.repo | |
sudo touch $FILE | |
sudo chown root:root $FILE | |
echo " | |
[nginx] | |
name=nginx repo | |
baseurl=http://nginx.org/packages/rhel/$releasever/$basearch/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add this line to your `Gemfile`: | |
gem 'sucker_punch' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "angular2-webpack-starter", | |
"version": "3.0.0", | |
"dependencies": { | |
"abbrev": { | |
"version": "1.0.7", | |
"from": "abbrev@>=1.0.0 <1.1.0", | |
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.7.tgz" | |
}, | |
"accepts": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@PageSpinner = | |
spin: (ms=500)-> | |
@spinner = setTimeout( (=> @add_spinner()), ms) | |
$(document).on 'page:change', => | |
@remove_spinner() | |
spinner_html: ' | |
<div class="modal hide fade" id="page-spinner" role="dialog"> | |
<div class="modal-dialog modal-sm" role="document"> | |
<div class="modal-content"> | |
<div class="modal-header"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load DSL and set up stages | |
require 'capistrano/setup' | |
# Include default deployment tasks | |
require 'capistrano/deploy' | |
# Include tasks from other gems included in your Gemfile | |
# | |
# For documentation on these, see for example: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generic checkbox toggle select all/none functionality. | |
# | |
# | |
# Given the following checkbox: | |
# <input type="checkbox" class="js-toggle-all" | |
# data-target=".approved-count" | |
# data-count="#counter" | |
# data-total="#total"> | |
# | |
# This checkbox kan toggle and count based on the selection of other checkboxes. |