This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Turn this: | |
| # [1, 2].include? 3 | |
| # | |
| # Into this: | |
| # 3.in? [1, 2] | |
| # | |
| # Why? Shorter, more readable conditionals: | |
| # puts 'booya' if 3.in? [1, 2] | |
| class Object |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| config = SimpleConfig.new | |
| config.load_file File.join(File.dirname(__FILE__), "sample.rb") | |
| config.get(:foo) #=> "bar" | |
| config[:save_path] #=> "/var/www/download" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ rpm help | |
| RPM version 4.4.2.3 | |
| Copyright (C) 1998-2002 - Red Hat, Inc. | |
| This program may be freely redistributed under the terms of the GNU GPL | |
| Usage: rpm [-aKfgpWHqV] [-aKfgpWHqVcdils] [-aKfgpWHqVcdilsaKfgpWHqV] [-aKfgpWHqVcdilsaKfgpWHqV] [-aKfgpWHqVcdilsaKfgpWHqV] [-aKfgpWHqVcdilsaKfgpWHqVK] [-aKfgpWHqVcdilsaKfgpWHqVK] [-aKfgpWHqVcdilsaKfgpWHqVKi] [-aKfgpWHqVcdilsaKfgpWHqVKiv] [-aKfgpWHqVcdilsaKfgpWHqVKiv] [-aKfgpWHqVcdilsaKfgpWHqVKiv?] [-a|--all] [-f|--file] [-g|--group] | |
| [-p|--package] [-W|--ftswalk] [--pkgid] [--hdrid] [--fileid] | |
| [--specfile] [--triggeredby] [--whatrequires] [--whatprovides] | |
| [--nomanifest] [-c|--configfiles] [-d|--docfiles] [--dump] [-l|--list] | |
| [--queryformat=QUERYFORMAT] [-s|--state] [--nomd5] [--nofiles] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: php-fastcgi | |
| # Required-Start: $all | |
| # Required-Stop: $all | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: Start and stop php-cgi in external FASTCGI mode | |
| # Description: Start and stop php-cgi in external FASTCGI mode | |
| ### END INIT INFO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtrRGakN2WRoXUIHhIVTg2d87EselCvRfI/Not+eE3gAQRm9m1v7hWGM6gDUTNnUGmda5+rHZgbxvrLwLTxNj3HmJNwQ63iiij6FdWk3f7mK8mBqnz7oPjwEF8HO/R1eJPenSe/C4KLyRVUHmmfbDDsJ6EALoy6+t4/VJFbi3NjnxftfxWIoiFw9R4FkmsDamuPue3wzA+qexhWhEEXDzOlLy6O+Nt47lfnWSRZPOKLc+kMljfq1NA2+ct+hnqVurSqpm332M27QdLucPmG/Jzo1EO/Pyp3it9KJAJ/qn9QcfiODL2rUnk9ZQTnm9ctEhdrTPeCyqBIJ+idYMt3LsKw== Chris@Callisto.local |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- TLC - The Tiny Lua Cocoa bridge | |
| -- Note: Only tested with LuaJit 2 Beta 9 on x86_64 with OS X >=10.7.3 & iPhone 4 with iOS 5 | |
| -- Copyright (c) 2012, Fjölnir Ásgeirsson | |
| -- Permission to use, copy, modify, and/or distribute this software for any | |
| -- purpose with or without fee is hereby granted, provided that the above | |
| -- copyright notice and this permission notice appear in all copies. | |
| -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!bash | |
| # | |
| # bash completion support for core Git. | |
| # | |
| # Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> | |
| # Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
| # Distributed under the GNU General Public License, version 2.0. | |
| # | |
| # The contained completion routines provide support for completing: | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtrRGakN2WRoXUIHhIVTg2d87EselCvRfI/Not+eE3gAQRm9m1v7hWGM6gDUTNnUGmda5+rHZgbxvrLwLTxNj3HmJNwQ63iiij6FdWk3f7mK8mBqnz7oPjwEF8HO/R1eJPenSe/C4KLyRVUHmmfbDDsJ6EALoy6+t4/VJFbi3NjnxftfxWIoiFw9R4FkmsDamuPue3wzA+qexhWhEEXDzOlLy6O+Nt47lfnWSRZPOKLc+kMljfq1NA2+ct+hnqVurSqpm332M27QdLucPmG/Jzo1EO/Pyp3it9KJAJ/qn9QcfiODL2rUnk9ZQTnm9ctEhdrTPeCyqBIJ+idYMt3LsKw== Chris@Callisto.local |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module SimplestAuth | |
| module Model | |
| def self.included(base) | |
| adapters.each do |adapter| | |
| if adapter.registered?(base) | |
| include adapter | |
| end | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function fish_prompt | |
| set_color green | |
| echo -n (pwd | sed "s!^$HOME!~!") | |
| set_color cyan | |
| if test -d .git | |
| echo -n '' (git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1]/") | |
| if [ (git status 2> /dev/null | tail -n1) != 'nothing to commit, working directory clean' ] |
OlderNewer