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
| import express from "express" | |
| var app = express(); | |
| app.get("/", (req, res) => { | |
| res.json({hello: 'world'}); | |
| }); | |
| var port = process.env.PORT || 3000; |
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
| board = """ | |
| ........................o........... | |
| ......................o.o........... | |
| ............oo......oo............oo | |
| ...........o...o....oo............oo | |
| oo........o.....o...oo.............. | |
| oo........o...o.oo....o.o........... | |
| ..........o.....o.......o........... | |
| ...........o...o.................... | |
| ............oo...................... |
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
| user:realm:fb6cb9e166c6c764ff2bdea12175a8aa |
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 coffee | |
| os = require 'os' | |
| chokidar = require './nosync/node_modules/chokidar' | |
| spawn = require('child_process').spawn | |
| watcher = null | |
| debounce = (fn, delay=100) -> | |
| timer = null | |
| -> | |
| context = this |
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
| # Meassure the difference: | |
| # $ ab -r -n 10 http://127.0.0.1:4567/ | grep "Requests per second" | |
| require 'sinatra' | |
| require 'logger' | |
| ERRLOG = Logger.new "#{__FILE__}.err" | |
| ERRQ = Queue.new | |
| Thread.new do | |
| loop do |
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 'deadweight' | |
| dw = Deadweight.new | |
| dw.stylesheets = ["public/css/application.css"] | |
| ignore_selectors = %w[.icon.* #modal-itx] | |
| dw.ignore_selectors = Regexp.compile "(#{ignore_selectors.join('|')})" | |
| dw.root = File.dirname(__FILE__) + '/' | |
| dw.pages = Dir['views/**/*.dust'] |
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 PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
| <html lang="en"> | |
| <head></head> | |
| <body> | |
| <script> | |
| document.write(+new Date); | |
| parent.leak(); | |
| </script> |
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
| # coding: UTF-8 | |
| require 'nokogiri' | |
| require 'tempfile' | |
| require 'json' | |
| VALID_NODE_NAMES = %w[title a abbr acronym address applet area article aside audio b base basefont bdi bdo bgsound big blink blockquote body br button canvas caption center cite code col colgroup command data datalist dd del details dfn dir div dl dt em embed fieldset figcaption figure font footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins isindex kbd keygen label legend li link listing main map mark marquee menu meta meter nav nobr noframes noscript object ol optgroup option output p param plaintext pre progress q rp rt ruby s samp script section select small source spacer span strike strong style sub summary sup table tbody td textarea tfoot th thead time title tr track tt u ul var video wbr xmp] | |
| class TidyHTML | |
| class << self | |
| def scan glob |
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
| diff --git a/autoload/gitgutter/utility.vim b/autoload/gitgutter/utility.vim | |
| index cecc887..62512d4 100644 | |
| --- a/autoload/gitgutter/utility.vim | |
| +++ b/autoload/gitgutter/utility.vim | |
| @@ -124,7 +124,15 @@ function! gitgutter#utility#file_relative_to_repo_root() | |
| endfunction | |
| function! gitgutter#utility#command_in_directory_of_file(cmd) | |
| - return 'cd ' . gitgutter#utility#shellescape(gitgutter#utility#directory_of_file()) . ' && ' . a:cmd | |
| + let cmd = 'cd ' . gitgutter#utility#shellescape(expand('%:p:h')) . ' && ' . a:cmd |
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 coffee | |
| coffeeWalk = (category, id) -> | |
| category.selected = category.id is id | |
| for subcategory in category.subcategories | |
| coffeeWalk subcategory, id | |
| category.selected or= subcategory.selected | |
| # var coffeeWalk = function(category, id) { | |
| # var i = 0, subcategories = category.subcategories, len = subcategories.length, subcategory; |