I hereby claim:
- I am doekman on github.
- I am doekman (https://keybase.io/doekman) on keybase.
- I have a public key whose fingerprint is 7297 CC1D DAE8 9DB5 8DF3 3DFD 6384 87DE FE24 F526
To claim this, I am signing this object:
Get-Content *.md | Measure-Object –Word | % { $count = $_.Words } | |
hg add | |
$message = "words: " + $count | |
$todo = (get-content .\todo.txt | select-string -pattern "[_]").length | |
$done = (get-content .\todo.txt | select-string -pattern "[x]").length | |
$message = $message + ", tasks: " + $done + "/" + ($todo + $done) + "" | |
hg commit -m $message | |
& .\progress.ps1 |
I hereby claim:
To claim this, I am signing this object:
Get-Content *.md | Measure-Object –Word | % { $count = $_.Words } | |
hg add | |
$message = "words:" + $count | |
$todo = (get-content .\todo.txt | select-string -pattern "[_]").length | |
$done = (get-content .\todo.txt | select-string -pattern "[x]").length | |
$message = $message + ", tasks: " + $done + "/" + ($todo + $done) + "" | |
hg commit -m $message | |
& .\progress.ps1 |
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Diagnostics.CodeAnalysis; | |
using System.Diagnostics.Contracts; | |
using System.Linq; | |
using System.Reflection; | |
namespace System.Web.WebPages |
// Refactor step 7, still don't like it, f*ck it, just use native function | |
function isLeapYear(year) { | |
return new Date(year, 2-1, 29).getDate() == 29; | |
} |
function repeat(str,num) { | |
return new Array(num+1).join(str); | |
} |
function rand(min, max) { | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
//The following gives the first and last element 50% less chance | |
//return Math.round(Math.random() * (max - min)) + min; | |
} |
on trim(theseCharacters, someText) | |
if class of someText is text and length of someText > 0 then | |
-- default values (all whitespace) | |
if theseCharacters is true then ¬ | |
set theseCharacters to {" ", tab, ASCII character 10, return, ASCII character 0} | |
repeat until first character of someText is not in theseCharacters | |
set someText to text 2 thru -1 of someText | |
end repeat |
#!/usr/bin/env python3 | |
# Tested on OS X | |
from lxml import html | |
import requests | |
import random | |
from subprocess import call | |
page = requests.get('http://wiki.secretgeek.net/best-of-wikipedia') |
#!/usr/bin/env bash | |
find . -maxdepth 1 -mindepth 1 -type d | while read i; do (cd "$i"; if [[ -d ".git" ]]; then echo "Checking $i" && git pull; fi; cd ..); done |