This file contains 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/bash | |
repos=( | |
"/Users/rob/Library/Application Support/TextMate/Bundles/Git.tmbundle" | |
"/Users/rob/Library/Application Support/TextMate/Bundles/Ruby.tmbundle" | |
"/Users/rob/Library/Application Support/TextMate/Bundles/RubyAMP.tmbundle" | |
"/Users/rob/Library/Application Support/TextMate/Bundles/Ruby Haml.tmbundle" | |
"/Users/rob/Library/Application Support/TextMate/Bundles/Ruby on Rails.tmbundle" | |
"/Users/rob/Library/Application Support/TextMate/Bundles/ruby-sass.tmbundle" | |
"/Users/rob/Library/Application Support/TextMate/Bundles/ruby-shoulda.tmbundle" |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>SoundCloud OAuth 2 User Agent Authentication Flow Demo</title> | |
<script type="text/javascript" charset="utf-8" src="javascript/jquery-1.4.2.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
$(function () { | |
var extractToken = function(hash) { |
This file contains 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
import org.apache.wicket.ajax.AbstractAjaxTimerBehavior; | |
import org.apache.wicket.ajax.AjaxRequestTarget; | |
import org.apache.wicket.util.time.Duration; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import java.util.concurrent.ExecutionException; | |
import java.util.concurrent.Future; |
This file contains 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
<? | |
/* | |
* This example would probably work best if you're using | |
* an MVC framework, but it can be used standalone as well. | |
* | |
* This example also assumes you are using Predis, the excellent | |
* PHP Redis library available here: | |
* https://github.com/nrk/predis | |
*/ |
This file contains 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
<?php | |
private function registerTemplatingConfiguration(array $config, $ide, ContainerBuilder $container, XmlFileLoader $loader) | |
{ | |
$loader->load('templating.xml'); | |
$loader->load('templating_php.xml'); | |
$links = array( | |
'textmate' => 'txmt://open?url=file://%f&line=%l', | |
'macvim' => 'mvim://open?url=file://%f&line=%l', |
This file contains 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
(* | |
-------- WHAT THIS DOES -------- | |
Enables you to externally open a specific file in eclipse, and go to some line | |
that is, makes a link with href of | |
openineclipse://open?url=file:///absolute/path/tofile.ext&line=5 | |
open absolute/path/tofile.ext in eclipse | |
and go to line 5 |
This file contains 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
#!/usr/bin/env ruby | |
# Usage: gitio URL [CODE] | |
# | |
# Turns a github.com URL | |
# into a git.io URL | |
# | |
# Copies the git.io URL to your clipboard. | |
url = ARGV[0] | |
code = ARGV[1] |
This file contains 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
./configure \ | |
--prefix=/opt/local/php/5.4 \ | |
--bindir=/opt/local/bin \ | |
--with-config-file-path=/opt/local/php/5.4/etc \ | |
--with-config-file-scan-dir=/opt/local/php/5.4/var/db \ | |
--mandir=/opt/local/php/5.4/share/man \ | |
--infodir=/opt/local/php/5.4/share/info \ | |
--program-suffix=-5.4 \ | |
--with-apxs2=/opt/local/apache2/bin/apxs \ | |
--enable-pdo \ |
This file contains 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/bash | |
function actual_path() { | |
if [ [ -z "$1" ] -a [ -d $1 ] ]; then | |
echo $(cd $1 && test `pwd` = `pwd -P`) | |
return 0 | |
else | |
return 1 | |
fi | |
} |
This file contains 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
<?php | |
/** | |
Truncate Html string without stripping tags | |
register in Resources/config/services.yml with: | |
services: | |
truncatehtml.twig.extension: | |
class: Radley\TwigExtensionBundle\Extension\TruncateHtmlExtension | |
tags: | |
- { name: twig.extension } |
OlderNewer