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
#!/bin/env coffee | |
require 'colors' | |
childProcess = require 'child_process' | |
spawn = childProcess.spawn | |
program = require 'commander' | |
os = require 'os' | |
fs = require 'fs' | |
async = require 'async' | |
# Cached variables |
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
#!/bin/bash | |
ARCH=i386 | |
RELEASE=17 | |
TFTP=/var/lib/tftpboot | |
A_TARGET=$TFTP/fedora/$RELEASE/$ARCH | |
TARGET=fedora/$RELEASE/$ARCH | |
MIRROR=http://mirror.yandex.ru/fedora/linux/releases/$RELEASE/Fedora/$ARCH/os |
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
#!/bin/bash | |
trap "echo Exited!; exit;" SIGINT SIGTERM | |
SOURCE="/home/" # Path to data needs backup | |
YESTERDAY=`date -I -d "1 day ago"` | |
TODAY=`date -I` | |
SERVER="user@server" | |
STORAGE="/storage/backup" |
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
#!/bin/bash | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
### | |
# index.js >> | |
# process.setuid('nobody') | |
# process.setgid('nobody') | |
### | |
USER=nobody |
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
private XStream xstream = new XStream(new StaxDriver(){ | |
public StaxWriter createStaxWriter(XMLStreamWriter out) throws XMLStreamException { | |
return createStaxWriter(out, false); | |
} | |
}); |
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
; Java Launcher | |
;-------------- | |
Name "Batch playlist" | |
Caption "Batch playlist" | |
Icon "playlist-icon.ico" | |
OutFile "BatchPlaylist.exe" | |
SilentInstall silent | |
AutoCloseWindow true |
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
context.on('click', function(){ | |
// Какой-то код | |
}); | |
setTimeout(function() { | |
context.trigger('click'); // "Бросаем" событие `click` | |
}, 5 * 1000); // Событие будет вызвано через 5 секунд |
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
var Me = function(){ | |
this.name = 'Dmitriy'; | |
} | |
Me.prototype.printName = function(){ | |
console.log(this.name); | |
} | |
var You = function(){ | |
this.name = 'Username'; |
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
var chunks = 10000; | |
var buf; | |
buf = new Buffer(4069); | |
buf.fill('a', 0, 4069); | |
(function(){ | |
var arr = [], | |
concated, | |
j = 0; |
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
var str = '', | |
max = 5000000, | |
tmp, | |
i = 0; | |
for( ; i < max; i++){ | |
str += 'a'; | |
} |