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 LinkedList { | |
constructor() { | |
this.headNode = null; | |
this.currNode = null; | |
} | |
append(data) // метод добавления элемента | |
{ | |
var newNode = new Node(); // создаём новый элемент |
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
# -*- coding: utf-8 -*- | |
""" | |
Скрипт для скачивания музыки с сайта vkontakte.ru (vk.com) | |
Запуск: | |
python vkcom_audio_download.py | |
Принцип работы: | |
Скрипт проверяет сохраненный access_token. Если его нет или срок истек, | |
то открывается страница в браузере с запросом на доступ к аккаунту. |
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 DB | |
{ | |
public function burn(string $data) | |
{ | |
if(empty($data)) throw new \Exception(sprintf("Wrong data, %s given" . PHP_EOL, $data)); | |
echo $data . PHP_EOL; | |
} | |
} |
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
DATE=`date +%Y-%m-%d` && mysqldump -u user_name -p"" db_name > "./db_name-dump-${DATE}.sql" |
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 () { | |
function FriendInviteBot() { | |
const netUrl = "https://www.linkedin.com/mynetwork/"; | |
var silent = false; | |
var buttonsList; | |
var alreadyCollectedUsers = []; | |
function timeOutDecorator(method, intervalSrc) { | |
return 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
(function(global){ | |
function EventController(){ | |
var oEvents = {}; | |
this.doEvent = function(eventname, args) { | |
if(typeof(eventname) !== 'string') { | |
return false; | |
} | |
if(typeof(oEvents[eventname]) === 'object' && Array.isArray(oEvents[eventname])) { |
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 | |
/** | |
* Array to Text Table Generation Class | |
* | |
* @author Tony Landis <[email protected]> | |
* @link http://www.tonylandis.com/ | |
* @copyright Copyright (C) 2006-2009 Tony Landis | |
* @license http://www.opensource.org/licenses/bsd-license.php | |
*/ | |
class ArrayToTextTable |
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 | |
function movement() { | |
local bname=$(basename "$1") | |
local fbname=${bname%.*} | |
mv "$1" "${fbname}" | |
} | |
find . -name '*.sh' -exec sh -c 'tr -d "\r" < "$0" > "$0.tmp"' '{}' \; | |
find . -name "*.sh.tmp" | while read file; do movement "$file"; done |
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 | |
echo "Dirs" | |
du -hsx * | sort -rh | head -10 | |
echo "Files" | |
find . -type f -printf '%s %p\n'| sort -nr | head -10 |
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 | |
/** | |
* Trait Decorator | |
* | |
* Required on host | |
* @method getDecoratedObject() | |
*/ | |
trait Decorator | |
{ |
OlderNewer