Skip to content

Instantly share code, notes, and snippets.

View wgetus's full-sized avatar
💭
I may be slow to respond.

Pavel Aheichyk wgetus

💭
I may be slow to respond.
View GitHub Profile
@wgetus
wgetus / ramdisk.sh
Created December 19, 2019 18:43 — forked from rxin/ramdisk.sh
ramdisk create/delete on Mac OS X.
#!/bin/bash
# From http://tech.serbinn.net/2010/shell-script-to-create-ramdisk-on-mac-os-x/
#
ARGS=2
E_BADARGS=99
if [ $# -ne $ARGS ] # correct number of arguments to the script;
then
@wgetus
wgetus / bootstrap.php
Created December 7, 2016 12:44 — forked from johnwards/bootstrap.php
Sending emails in Silex via Swiftmailer spool
<?php
//...your silex bootstrap.
//Configure Swiftmail to use SMTP.
$app->register(new SwiftmailerExtension(), array(
'swiftmailer.options' => array(
'host' => 'smtp.gmail.com',
'port' => 465,
'username' => '[email protected]',
@wgetus
wgetus / gist:02b91beb02c20a82da160b82539575c0
Created December 5, 2016 14:30 — forked from stuart11n/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@wgetus
wgetus / d.js
Created May 30, 2016 12:28 — forked from pafnuty/declination.js
Склонение слов на javascript и php с идентичной реализацией передачи параметров
/**
* Функция для склонения слов
* Пример использования: cnDeclination(5,'комментари|й|я|ев')
*
* @author Павел Белоусов <pb@info-expert.ru>
*
* @param int number число, для которого будет расчитано окончание
* @param string words слово и варианты окончаний для 1|2|1 (1 комментарий, 2 комментария, 100 комментариев)
*
* @return string - слово с правильным окончанием
@wgetus
wgetus / nginx.default.conf
Created May 17, 2016 10:29 — forked from santoshachari/nginx.default.conf
PHP5.6 and NGINX: Install PHP56-FPM, Nginx & MySQL on EC2 with Amazon Linux AMI
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and php56-FPM
sudo yum install -y nginx php56-fpm
# Install php56 extensions
sudo yum install -y php56-devel php-mysql php56-pdo php56-pear php56-mbstring php56-cli php56-odbc php56-imap php56-gd php56-xml php56-soap