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
for (var i = 1; i <= 100; i++) { | |
if (i % 15 === 0) { | |
console.log('FizzBuzz'); | |
} else if (i % 3 === 0) { | |
console.log('Fizz'); | |
} else if (i % 5 === 0) { | |
console.log('Buzz'); | |
} else { | |
console.log(i); | |
} |
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
class PhpunitController extends Controller | |
{ | |
public function runTestsAction($filterClass = null) | |
{ | |
// Make sure PHPUnit is autoloaded | |
require_once('PHPUnit/Autoload.php'); | |
set_time_limit(0); | |
$version = \PHPUnit_Runner_Version::id(); |
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 compass/reset | |
@import compass/css3/border-radius | |
table | |
border: none | |
border-collapse: separate | |
th, td | |
padding: 5px | |
thead | |
background-color: #f2f6fa |
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
<div class="pager"> | |
{% if first is defined %} | |
<span class="first"> | |
{% if current != first and first < 0 %} | |
<a href="{{ path(route, query|merge({'page': first})) }}">first</a> | |
{% else %} | |
first | |
{% endif %} | |
</span> | |
{% endif %} |
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 | |
# | |
# @author: Chris Jones <leeked@gmail.com> | |
# @version: 1.1.0 | |
# | |
# Rackspace Cloud Sites only allows running scripts via their web-based "cron" tool. | |
# FTP this script into your Web directory and add it to the scheduled tasks section. | |
# Set the "Command Language" to: perl | |
# Set the "Command to Run" to: migrate.sh refreshdb |
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 | |
namespace Example\AppBundle\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller, | |
Symfony\Component\HttpFoundation\Request, | |
Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; | |
class ExampleController extends Controller | |
{ |
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 | |
# encoding: UTF-8 | |
# file: hooks/post-receive-pivotal | |
require 'net/http' | |
require 'nokogiri' | |
# Ruby 1.8.7 | |
class String | |
def force_encoding(enc) |
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 | |
set -o errexit | |
# Author: David Underhill | |
# Script to permanently delete files/folders from your git repository. To use | |
# it, cd to your repository's root and then run the script with a list of paths | |
# you want to delete, e.g., git-delete-history path1 path2 | |
if [ $# -eq 0 ]; then | |
exit 0 |
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
UPDATE cms_block SET content = REPLACE(content, "http://www.example.com/", "{{store url=''}}"); | |
UPDATE cms_page SET content = REPLACE(content, "http://www.example.com/", "{{store url=''}}"); | |
-- | |
-- AW_Blog Only | |
-- | |
UPDATE aw_blog SET post_content = REPLACE(post_content, 'http://www.example.com/', "{{store url=''}}"); |
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 | |
namespace app\controllers; | |
use app\models\Downloads; | |
class DownloadsController extends \lithium\action\Controller { | |
public function index() { | |
$this->request->privateKeys = array('id', 'user_id'); |
OlderNewer