Yesterday I found some people on my [favorite reddit][lolphp] wonder about the output of the following code:
<?php
$a = 1;
$c = $a + $a++;
#!/usr/local/bin/python3.2 | |
""" | |
Python interpreter for the esoteric language ><> (pronounced /ˈfɪʃ/). | |
Usage: ./fish.py --help | |
More information: http://esolangs.org/wiki/Fish | |
Requires python 2.7/3.2 or higher. |
#!/usr/local/bin/guile | |
!# | |
(define (bug? form) | |
(equal? form '((display "scheme sucks!\n")))) | |
(define buggy-code | |
'((display "scheme is great!\n"))) | |
(define safe-compiler |
#!/usr/bin/env python | |
# | |
# Very simple Python script to dump all emails in an IMAP folder to files. | |
# This code is released into the public domain. | |
# | |
# RKI Nov 2013 | |
# | |
import sys | |
import imaplib | |
import getpass |
(use-srfis '(1 69)) | |
(read-hash-extend #\# | |
(lambda (c port) | |
(define ht (make-hash-table eqv?)) | |
(define (ht-ref key) | |
(hash-table-ref ht key (lambda () | |
(define sym (gensym)) | |
(hash-table-set! ht key sym) | |
sym))) | |
(define (hash-key x) |
" Vim indent file | |
" Language: Lua | |
" Maintainer: Daniel Miller <[email protected]> | |
" Original Author: Daniel Miller <[email protected]> | |
" Last Change: 2014 Feb 6 | |
" Only load this indent file when no other was loaded. | |
if exists("b:did_indent") | |
finish | |
endif |
Removing the last commit
To remove the last commit from git, you can simply run git reset --hard HEAD^
If you are removing multiple commits from the top, you can run git reset --hard HEAD~2 to remove the last two commits. You can increase the number to remove even more commits.
If you want to "uncommit" the commits, but keep the changes around for reworking, remove the "--hard": git reset HEAD^
which will evict the commits from the branch and from the index, but leave the working tree around.
If you want to save the commits on a new branch name, then run git branch newbranchname
before doing the git reset.
;(function ( $ ) { | |
'use strict'; | |
$(document).ready(function() { | |
$('form').bind('submit', function() { | |
$(this).find('button[type="submit"] i').attr('class', 'glyphicon glyphicon-refresh animate'); | |
}); | |
}); | |
})( jQuery ); |
I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)