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
// libcurses: sudo apt-get install libncurses5-dev | |
// g++ -o snake snake.cpp --std=c++11 -lncurses -Wall && ./snake | |
#include <curses.h> | |
#include <unistd.h> | |
#include <cassert> | |
#include <cstdlib> | |
#include <string> |
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
#!/usr/bin/env sh | |
icons=(ash/resources/vector_icons/*.icon) | |
icons_stripped=() | |
for icon in ${icons[@]}; do | |
icon=$(basename "$icon") | |
icon=${icon/.1x/} | |
icon=${icon/.icon/} | |
icons_stripped+=($icon) | |
done |
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
function start() { | |
for (let el of Array.from(document.querySelectorAll('li.deckCard'))) { | |
el.addEventListener('click', function() { | |
draw(el.querySelector('span.name').textContent.toLowerCase()); | |
}); | |
} | |
} | |
function draw(name) { | |
let costReduced = false; | |
for (var el of Array.from(document.querySelectorAll('li.deckCard'))) { |
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
#!/bin/sh | |
DIRS=( | |
chrome/browser/ui/webui/settings/ | |
chrome/browser/resources/settings/ | |
chrome/test/data/webui/settings/ | |
ui/webui/resources/cr_elements/cr_dialog/ | |
ui/webui/resources/cr_elements/policy/ | |
ui/webui/resources/cr_elements/network/ | |
) |
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
<div>Hello</div><script src="volume.js"></script> |
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
console.log('hello'); |
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
#!/bin/sh | |
DIRS=( | |
chrome/browser/ui/webui/settings/ | |
chrome/browser/resources/settings/ | |
chrome/test/data/webui/settings/ | |
ui/webui/resources/cr_elements/cr_dialog/ | |
ui/webui/resources/cr_elements/policy/ | |
ui/webui/resources/cr_elements/network/ | |
) |
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
#!/bin/sh | |
DIRS=( | |
chrome/browser/ui/webui/settings/ | |
chrome/browser/resources/settings/ | |
chrome/test/data/webui/settings/ | |
ui/webui/resources/cr_elements/cr_dialog/ | |
ui/webui/resources/cr_elements/policy/ | |
ui/webui/resources/cr_elements/network/ | |
) |
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
<!DOCTYPE html> | |
<body itemscope itemtype="http://schema.org/WebPage"> | |
<div itemprop="author" itemscope itemtype="http://schema.org/Person"> | |
<span itemprop="name">Correct URL (Relative)</span> | |
<link itemprop="url" href="google.tar.gz"> | |
</div> | |
<div itemprop="author" itemscope itemtype="http://schema.org/Person"> | |
<span itemprop="name">Bad URL (Absolute)</span> | |
<link itemprop="url" href="google.com"> | |
</div> |
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
/** | |
* Returns the index of the item in a sorted array closest to |target|. | |
* @param {!Array<number>} arr Sorted array (ascending or descending). | |
* @param {number} target | |
* @return {number} Index of closest item, or -1 on error. | |
*/ | |
function binarySearchApprox(arr, value) { | |
if (!arr.length || !Number.isFinite(value)) return -1; | |
if (arr.length == 1) return 0; |
NewerOlder