Skip to content

Instantly share code, notes, and snippets.

View krisdages's full-sized avatar

Kris Dages krisdages

  • Enverus
  • Austin, TX
View GitHub Profile
@krisdages
krisdages / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@krisdages
krisdages / gulpfile.js
Last active August 29, 2015 14:08 — forked from jdx/gulpfile.js
var gulp = require('gulp');
var less = require('gulp-less');
gulp.task('less', function() {
return gulp.src('css/app.less')
.pipe(less())
.pipe(gulp.dest('dist'));
});
gulp.task('watch', ['less'], function() {
@krisdages
krisdages / _readme.md
Last active August 29, 2015 14:19 — forked from shime/_readme.md

Having trouble installing the latest stable version of tmux?

I know, official package for your OS/distro is outdated and you just want the newest version of tmux.

Well, this script should save you some time with that.

Prerequisities

  • gcc
@krisdages
krisdages / ChildList.cs
Created June 3, 2011 01:55
Child List for bidirectional nHibernate one-to-many collections
//IList<Child> childList = new ChildList<Parent, Child>(parent, (p, c) => { c.Parent = p; });
/// <summary>
/// List of objects that maintain a reference to their parent object. Adding and removing from the list call a lambda-based
/// setter to set the parent reference.
/// </summary>
/// <typeparam name="TParent"></typeparam>
/// <typeparam name="TChild"></typeparam>
public class ChildList<TParent, TChild> : IList<TChild>, ICollection
where TParent : class
@ECHO OFF
REM -- Automates cygwin installation
SETLOCAL
REM -- Change to the directory of the executing batch file
CD %~dp0
REM -- Configure our paths
SET SITE=http://mirrors.kernel.org/sourceware/cygwin/
#!/bin/sh
SDK=`dirname $0`
SCRIPT=`basename $0`
SDKPARENT=`dirname $SDK`
PLATFORM=`uname -sp`
if [ "$PLATFORM" = "Darwin i386" -o "$PLATFORM" = "Darwin x86_64" ]; then
echo "iPhone Toolchain installer script by rpetrich"
echo ""
@krisdages
krisdages / get_latest_release.sh
Created October 25, 2017 20:43 — forked from lukechilds/get_latest_release.sh
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4