I hereby claim:
- I am joechrysler on github.
- I am joechrysler (https://keybase.io/joechrysler) on keybase.
- I have a public key whose fingerprint is 71C8 5928 84FB 0525 82DB 61EA 5741 DED0 F064 E9A9
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
on run {input, parameters} | |
tell application "Reminders" | |
if (count of (reminders whose completed is true)) > 0 then | |
set todoList to reminders whose completed is true | |
repeat with itemNum from 1 to (count of (reminders whose completed is true)) | |
set reminderObj to item itemNum of todoList | |
set nameObj to name of reminderObj | |
set compDateObj to completion date of reminderObj | |
if (body of reminderObj) is not "" and (body of reminderObj) is not missing value then | |
set bodyObj to " Notes: " & body of reminderObj |
git checkout -b new_branch # make the new branch so you don't lose commits | |
git push origin new_branch:new_branch # push your new branch to github so github doesn't lose commits | |
git checkout master # switch to master so that you're resetting master, not your new branch | |
git reset --hard cbedd62 # move master back to the last commit it should be on | |
git checkout master # you should be at the old commit. | |
git push -f origin master:master |
#!/usr/bin/env bash | |
mkdir weirdness | |
cd weirdness | |
git init | |
echo "hello" > file | |
git add file | |
git commit -m "add file" | |
echo '' |
<script> | |
window.onload = function (e) { | |
var my_image = document.getElementById("image_id"); // Get a reference to the image tag | |
var d = new Date(); // Instantiate a new date object | |
if (d.getDay() == 3) { // Sunday = 0, Monday = 1, etc... // If today is Wednesday | |
my_image.src = "path/to/other/image.png"; // Change the image's src attribute | |
} | |
} | |
</script> |
# In our codebase, we do a lot of this: | |
if some_really_long_boolean | |
and another_really_long_boolean | |
and a_third_really_long_boolean: | |
print "Yehaw!" | |
# PEP8 says we should probably be writing thusly | |
if some_really_long_boolean and | |
another_really_long_boolean and | |
a_third_really_long_boolean: |
#!/usr/bin/env zsh | |
git show-branch -a \ | |
| grep '\*' \ | |
| grep -v `git rev-parse --abbrev-ref HEAD` \ | |
| head -n1 \ | |
| sed 's/.*\[\(.*\)\].*/\1/' \ | |
| sed 's/[\^~].*//' | |
# How it works: |
require "rubygems" | |
require "redis" | |
origin = Redis.new(host: '127.0.0.1', port: 6379) | |
destination = Redis.new(host: '127.0.0.1', port: 6380) | |
500.times do |i| | |
origin.set(i, "value#{i}") | |
end |
a guide for sceptic's
It's easy they said. Distributed SCMs are all basically the same they said, so transitioning from one to the other is super easy. So easy that in the time it's taken to write this sentence, you should have already installed a plugin and pushed your mercurial repo up to github right?
The mercurial to git conversion is nothing short of a pain. Documentation is spotty and full of that peculiarly glib variety of optimism found most often at fast food eateries and VC-funded startups. But you know that already. That's why you're here after all.
no. you can escape the plastic land of hg and enter the land of gritty git goodness.
" Pop the following into your .vimrc | |
" Move a line of text using CTRL+[arrows] | |
nmap <C-down> mz:m+<cr>`z | |
nmap <C-up> mz:m-2<cr>`z | |
nmap <C-left> << | |
nmap <C-right> >> | |
vmap <C-down> :m'>+<cr>`<my`>mzgv`yo`z | |
vmap <C-right> :m'<-2<cr>`>my`<mzgv`yo`z | |
"" Move around split windows with CTRL+[jkhl] |