Skip to content

Instantly share code, notes, and snippets.

def insert_sort(arr):
element = 0
for i in range(0, len(arr)):
element = arr[i]
j = i
while j > 0 and element < arr[j-1]:
arr[j] = arr[j-1]
j -= 1
arr[j] = element
return arr
@ink-well
ink-well / gulpfile.js
Created May 22, 2016 11:35 — forked from mlouro/gulpfile.js
gulpfile.js with browserify, jshint, libsass, browserSync for livereload, image optimization and system notifications on errors
'use strict';
var gulp = require('gulp');
var gutil = require('gulp-util');
var del = require('del');
var uglify = require('gulp-uglify');
var gulpif = require('gulp-if');
var exec = require('child_process').exec;
var notify = require('gulp-notify');
source 'https://rubygems.org'
gem 'rails', '4.2.5.1'
gem 'bootstrap-sass'
gem 'bcrypt-ruby'
gem 'faker'
gem 'will_paginate'
gem 'bootstrap-will_paginate'