A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
| #!/bin/bash | |
| COMMIT=$1 | |
| BRANCH=$2 | |
| if [ -z $BRANCH ]; then | |
| BRANCH="master" | |
| fi | |
| perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' \ | |
| <(git rev-list --ancestry-path --oneline $COMMIT..$BRANCH) \ |
| ;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY | |
| ;by doppelganger ([email protected]) | |
| ;This file is provided for your own use as-is. It will require the character rom data | |
| ;and an iNES file header to get it to work. | |
| ;There are so many people I have to thank for this, that taking all the credit for | |
| ;myself would be an unforgivable act of arrogance. Without their help this would | |
| ;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into | |
| ;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no |
| { | |
| "require": { | |
| "react/socket": "0.2.*" | |
| } | |
| } |
| <?php | |
| namespace Acme\BlogBundle\Tests\Controller; | |
| use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | |
| class DefaultControllerTest extends WebTestCase | |
| { | |
| public function testIndex() | |
| { |
| # SYMFONY | |
| _symfony() { | |
| local cur cmd | |
| COMPREPLY=() | |
| cur="${COMP_WORDS[${COMP_CWORD}]}" | |
| command="${COMP_WORDS[1]}" | |
| if [ ${COMP_CWORD} == 1 ]; then | |
| cmds="$(symfony list --no-ansi | grep -e '^\s\s[a-z]' | awk '{ print $1}')" |
| # Create a self-signed cert | |
| openssl req -x509 -batch -nodes -newkey rsa:2048 -keyout lumberjack.key -out lumberjack.crt | |
| # Create a self-signed with DNS SAN | |
| openssl req -x509 -nodes -new -subj "/CN=localhost" -addext "subjectAltName = DNS:localhost" -newkey rsa:2048 -keyout | |
| /tmp/server.key -out /tmp/server.crt | |
| <?php | |
| namespace Foo\CoreBundle\Form\EventListener; | |
| use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
| use Symfony\Component\Form\FormEvents; | |
| use Symfony\Component\Form\FormEvent; | |
| use Symfony\Component\Form\FormInterface; | |
| /** | |
| * Changes Form->bind() behavior so that it treats not set values as if they |
The [RFC for a new simple to use password hashing API][rfc] has just been accepted for PHP 5.5. As the RFC itself is rather technical and most of the sample codes are something you should not use, I want to give a very quick overview of the new API:
Everybody knows that you should be hashing their passwords using bcrypt, but still a surprising number of developers uses insecure md5 or sha1 hashes (just look at the recent password leaks). One of the reasons for this is that the crypt() API is ridiculously hard to use and very prone to programming mistakes.
| #!/usr/bin/env ruby | |
| # API Documentation at http://api.wikia.com/wiki/LyricWiki_API | |
| require 'open-uri' | |
| require 'json' | |
| require 'tmpdir' | |
| ARTIST = "Johnny Cash" |