Install:
$ npm install eslint babel-eslint eslint-config-airbnb
.eslintrc:
{
"extends": "airbnb/base",
"parser": "babel-eslint",
"rules": {
"max-len": [2, 80, 2, {
var texts = Array.map( | |
document.querySelectorAll('#queue .item_content'), | |
elem => { | |
let link_text = elem.querySelector('.title').text; | |
let link_url = decodeURIComponent(elem.querySelector('.original_url').href.replace('https://getpocket.com/redirect?url=', '')); | |
let tags = Array.map(elem.querySelectorAll('.tag'), elem => elem.text); | |
return [ | |
link_text, | |
link_url, | |
tags |
Install:
$ npm install eslint babel-eslint eslint-config-airbnb
.eslintrc:
{
"extends": "airbnb/base",
"parser": "babel-eslint",
"rules": {
"max-len": [2, 80, 2, {
I hereby claim:
To claim this, I am signing this object:
class MaxSearch: | |
def __init__(self, max_value=2**16): | |
self.max_value = max_value | |
# Override this method with your validity check | |
def check_result(self, number): | |
pass | |
def scan(self, min_=0): | |
max_ = self.max_value |
with open("Book.txt") as f: | |
print ('echo "Starting build of {book}.epub";' | |
"pandoc {files} " + | |
"--smart --table-of-contents --chapters -o {book}.epub;" | |
'echo " {book}.epub created."' | |
).format(book="Book", files=f.read().replace("\n", " ")) |
'.source.js': | |
'i18n translation singular': | |
'prefix': 'i18' | |
'body': '{i18n.gettext(\'$1\')}$2' | |
'i18n translation plural': | |
'prefix': 'i18n' | |
'body': '{i18n.ngettext(\'$1\', \'$2\', ${3:idx})}$4' | |
'New test suite': | |
'prefix': 'newtest' | |
'body': """ |
# name an email address in all old commits. | |
# WARNING: Will change all your commit SHA1s. | |
# Based off of the script from here: | |
# http://coffee.geek.nz/how-change-author-git.html | |
git filter-branch -f --commit-filter ' | |
if [ "$GIT_COMMITTER_EMAIL" = "<INITIAL-EMAIL>" ]; | |
then | |
GIT_AUTHOR_EMAIL="<FINAL-EMAIL>"; | |
git commit-tree "$@"; | |
else |
I've been frustrated for a few years that GNU screen
didn't have emoji support
but I just rechecked the issue... And guess what? It's fixed as of version 4.6.0!! While this is great news,
the last available version in raspbian is 4.1.0, meaning that yes, we have to compile.
The steps are easy:
fn main() { | |
let gifts = [ | |
("First", "a Partridge in a Pear Tree"), | |
("Second", "Two Turtle Doves"), | |
("Third", "Three French Hens"), | |
("Fourth", "Four Calling Birds"), | |
("Fifth", "Five Gold Rings"), | |
("Sixth", "Six Geese a-Laying"), | |
("Seventh", "Seven Swans a-Swimming"), | |
("Eighth", "Eight Maids a-Milking"), |