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
{ | |
"terminal.integrated.fontSize": 13, | |
"workbench.editorAssociations": { | |
"*.ipynb": "jupyter-notebook" | |
}, | |
"python.pythonPath": "/usr/local/bin/python3", | |
"files.autoSave": "onFocusChange", | |
"editor.fontSize": 14, | |
"terminal.external.osxExec": "iTerm2.app", | |
"terminal.integrated.defaultProfile.osx": "zsh", |
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
grep -rli --null --include '*.json' find_this_text . | xargs -0 sh -c 'mv "$@" new/destination/path' sh |
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
require 'digest/sha1' | |
def combinator(arr, comb_arr = arr, len) | |
return if len == 0 | |
if len == 1 | |
return comb_arr | |
else | |
tmp_arr = [] | |
arr.each do |ch| |
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
-# Rails flash messages styled for Zurb Foundation 6 | |
- flash.each do |name, msg| | |
- if msg.is_a?(String) | |
%div{:class => "callout #{name.to_s == 'notice' ? 'success' : 'alert'}", "data-alert" => ""} | |
%button.close-button{"aria-label" => "Close alert", :type => "button"} | |
%span{"aria-hidden" => "true"} × | |
= content_tag :p, msg |
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
<script type="text/javascript"> | |
$(function(){ | |
$('#search').on('keyup', function(){ | |
var _this = $(this), | |
found = $('#main-search-found'); | |
if (_this.val().length >= 3) { | |
$.ajax({ | |
type: "POST", | |
url: "/search/", |