This file contains hidden or 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
| #include "opencv2/highgui/highgui.hpp" | |
| #include "opencv2/imgproc/imgproc.hpp" | |
| #include <algorithm> | |
| #include <iostream> | |
| #include <iterator> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| using namespace cv; | |
| using namespace std; |
This file contains hidden or 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/sh | |
| # Must be called with two command-line args. | |
| # Example: git-svn-relocate.sh http://old.server https://new.server | |
| if [ $# -ne 2 ] | |
| then | |
| echo "Please invoke this script with two command-line arguments (old and new SVN URLs)." | |
| exit $E_NO_ARGS | |
| fi | |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset=utf-8 /> | |
| <title>Mental mapping code smell</title> | |
| <style> | |
| .language-flag { | |
| float: left; | |
| } | |
| </style> |
This file contains hidden or 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
| DEPLOYER='deployer' | |
| DEPLOYER_HOME="/home/$DEPLOYER" | |
| PROJECT_NAME='node-js-sample' | |
| PROJECT_REPO='https://github.com/heroku/node-js-sample.git' | |
| # Provisining an ubuntu server | |
| apt-get -y update | |
| apt-get -y upgrade | |
| apt-get -y install software-properties-common | |
| add-apt-repository ppa:chris-lea/node.js |
This file contains hidden or 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
| function! ExtractProperty() | |
| let a_save = @a | |
| try | |
| let properties_file = expand('%:r').'.properties' | |
| if filereadable(properties_file) | |
| normal! gv"ay | |
| let value = @a | |
| let key = substitute(value, ".*", "\\U\\0", "") | |
| let key = substitute(key, '\W\+', "_", "g") | |
| if len(key) > 20 |
This file contains hidden or 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/python | |
| # -*- coding: utf-8 -*- | |
| import sublime, sublime_plugin | |
| import tempfile, subprocess, collections | |
| DEBUG_MODE = False | |
| IS_OSX = sublime.platform() == 'osx' | |
| settings = sublime.load_settings('SpotsManager.sublime-settings') |
This file contains hidden or 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 ruby | |
| # coding: UTF-8 | |
| require 'pathname' | |
| require 'googlecharts' | |
| file = Pathname.new 'zsh_history' | |
| dates = {} | |
| file.each_line do |line| | |
| next unless line =~ /^: / |
This file contains hidden or 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
| # A sample Gemfile | |
| source "https://rubygems.org" | |
| gem "sinatra" | |
| gem "mongoid" | |
| gem "bson_ext" | |
| gem 'sinatra-reloader' | |
| gem 'haml' |
This file contains hidden or 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
| Function::patch = (binding, fn) -> | |
| unless fn | |
| fn = binding | |
| binding = @ | |
| wrapped = (args...) -> | |
| args.unshift (args...) -> | |
| wrapped.previous.apply binding, args | |
| fn.apply binding, args | |
| wrapped.previous = @ | |
| wrapped |
This file contains hidden or 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 ruby | |
| # coding: UTF-8 | |
| require 'yaml' | |
| ALIAS = { | |
| text: '/vendor/requirejs-text/text', | |
| jquery: '/vendor/jquery/dist/jquery', | |
| dust: '/vendor/dustjs-linkedin/dist/dust-full', | |
| dustHelpers: '/vendor/dustjs-linkedin-helpers/dist/dust-helpers', | |
| pagejs: '/vendor/page.js/page', |