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
'use strict'; | |
// # Globbing | |
// for performance reasons we're only matching one level down: | |
// 'test/spec/{,*/}*.js' | |
// use this if you want to match all subfolders: | |
// 'test/spec/**/*.js' | |
module.exports = function (grunt) { |
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
// from https://github.com/Shopify/liquid/blob/63eb1aac69a31d97e343822b973b3a51941c8ac2/performance/shopify/shop_filter.rb#L100 | |
Shopify.handleize = function (str) { | |
str = str.toLowerCase(); | |
var toReplace = ['"', "'", "\\", "(", ")", "[", "]"]; | |
// For the old browsers | |
for (var i = 0; i < toReplace.length; ++i) { | |
str = str.replace(toReplace[i], ""); | |
} |
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
<span class="test1">{{ "abcde" | slice: 0, -2 }}</span> | |
<span class="test2">{{ "abcde" | slice: -2, 0 }}</span> | |
<span class="test3">{{ "abcde" | slice: 1, -2 }}</span> | |
<span class="test4">{{ "abcde" | slice: -2, 1 }}</span> | |
<span class="test5">{{ "abcde" | slice: 0, 1 }}</span> | |
<span class="test6">{{ "abcde" }}</span> |
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
javascript:(function(){if($("%23question textarea[name=comment]").length <=0){$("%23question .comments-link").click();}$("%23question textarea[name=comment]").val("[**Please, don't use `mysql_*` functions in new code**](http://bit.ly/phpmsql). They are no longer maintained [and are officially deprecated](https://wiki.php.net/rfc/mysql_deprecation). See the [**red box**](http://j.mp/Te9zIL)%3F Learn about [*prepared statements*](http://j.mp/T9hLWi) instead, and use [PDO](http://php.net/pdo) or [MySQLi](http://php.net/mysqli) - [this article](http://j.mp/QEx8IB) will help you decide which. If you choose PDO, [here is a good tutorial](http://j.mp/PoWehJ).");})(); |
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
@echo off | |
java -Xms1024M -Xmx1024M -jar minecraft_server.jar nogui | |
pause |
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
import MySQLdb | |
import csv | |
import time | |
import traceback | |
import warnings | |
warnings.filterwarnings('ignore', category=MySQLdb.Warning) | |
def handle_yes_no(input): |
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
# ... class | |
if msg.startswith("@top"): | |
def ladder(result): | |
parseResultLoginHere(result) | |
api_ladder = getPage("http://a.scrollsguide.com/ranking?limit=10&fields=name,rating,rank", method='GET', postdata=None, headers=None, agent="User-Agent\", \"Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1667.0 Safari/537.36", timeout=0, cookies=None, followRedirect=True, redirectLimit=20, afterFoundGet=False) | |
api_ladder.addCallback(ladder) |
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
def funThings(result): | |
doSomeOtherStuff() | |
d = thingThatReturnADeferred() | |
d.addCallback(funThings) # passing function object, not calling the function |
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
Minimum Requirements: | |
CPU: Intel Pentium D or AMD Athlon 64 (K8) 2.6 GHz | |
RAM: 2GB | |
GPU (Integrated): Intel HD Graphics or AMD (formerly ATI) Radeon HD | |
Graphics with DirectX 9.0c | |
GPU (Discrete): Nvidia GeForce 8400 or AMD Radeon HD 2400 with DirectX 9.0c | |
HDD: 700MB | |
OS: Windows Vista, Mac OSX 10.6 | |
Mouse and Keyboard | |
Internet connection (ADSL or better) |
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
Minimum Requirements: | |
CPU: Intel Pentium D or AMD Athlon 64 (K8) 2.6 GHz | |
RAM: 2GB | |
GPU (Integrated): Intel HD Graphics or AMD (formerly ATI) Radeon HD Graphics with DirectX 9.0c | |
GPU (Discrete): Nvidia GeForce 8400 or AMD Radeon HD 2400 with DirectX 9.0c | |
HDD: 700MB | |
OS: Windows Vista, Mac OSX 10.6 | |
Mouse and Keyboard | |
Internet connection | |