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/perl -w # camel code | |
use strict; | |
$_='ev | |
al("seek\040D | |
ATA,0, 0;");foreach(1..3) | |
{<DATA>;}my @camel1hump;my$camel; | |
my$Camel ;while( <DATA>){$_=sprintf("%-6 | |
9s",$_);my@dromedary 1=split(//);if(defined($ |
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 EventManager | |
{ | |
public $listeners = []; | |
public function register($eventName, $listener) | |
{ | |
$this->listeners[$eventName][] = $listener; | |
} |
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 python | |
# -*- coding: utf-8 -*- | |
import Skype4Py | |
# Create an instance of the Skype class. | |
skype = Skype4Py.Skype() | |
# Connect the Skype object to the Skype client. | |
skype.Attach() |
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
upstream phpfcgi { | |
server 127.0.0.1:9000; | |
} | |
server { | |
listen 80; | |
server_name lostepisode.ru www.lostepisode.ru; | |
root /www/lostepisode.ru/web; | |
error_log /www/logs/lostepisode.ru/error.log; | |
access_log /www/logs/lostepisode.ru/access.log; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>author</key> | |
<string>Michael Sheets</string> | |
<key>name</key> | |
<string>Twilight</string> | |
<key>settings</key> | |
<array> |
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
Show hidden characters
{ | |
//Debug logging | |
"debug_enable": false, | |
// When only either the left or right bracket can be found | |
// this defines if the unmatched bracket should be shown. | |
"show_unmatched" : true, | |
// High visibilty style and color for high visibility mode | |
// (solid|outline|underline|thin_underline|squiggly|stippled) |
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
[ | |
{ "keys": ["ctrl+e"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} }, | |
{ "keys": ["ctrl+shift+b"], "command": "expand_selection", "args": {"to": "brackets"} }, | |
{ "keys": ["ctrl+b"], "command": "move_to", "args": {"to": "brackets"} }, | |
{ "keys": ["ctrl+k"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} }, | |
{ "keys": ["ctrl+r"], "command": "show_panel", "args": {"panel": "replace"} }, | |
{ "keys": ["ctrl+shift+r"], "command": "replace_next" }, | |
{ "keys": ["ctrl+s"], "command": "save" }, | |
{ "keys": ["ctrl+shift+s"], "command": "prompt_save_as" }, | |
{ "keys": ["ctrl+u"], "command": "upper_case" }, |
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
function random_password( $length = 8 ) { | |
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-=+;:,.?"; | |
$password = substr( str_shuffle( $chars ), 0, $length ); | |
return $password; | |
} |
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 python | |
# -*- coding: utf-8 -*- | |
# Алгоритм Дейкстры | |
# Находит кратчайшее расстояние от одной из вершин графа до всех остальных. | |
# Алгоритм работает только для графов без рёбер отрицательного веса. | |
# Матрица задается как список словарей смежности вершин | |
# Описание алгоритма http://goo.gl/KsqC | |
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
SELECT SUBSTRING_INDEX(Email, '@', -1) as Domain, count(*) as Total | |
FROM Users | |
GROUP BY Domain | |
ORDER BY Total DESC | |
LIMIT 15; |
NewerOlder