Add into begining of file ~/.bashrc
[ -d ~/bin ] && PATH=~/bin:$PATH
A mysql and a mysqldump without user:passwod
const config = require("dotenv").config().parsed; | |
for (const k in config) { | |
process.env[k] = config[k]; | |
} | |
// npm install @slack/bolt@feat-workflow-steps | |
const { App } = require("@slack/bolt"); | |
const app = new App({ | |
signingSecret: process.env.SLACK_SIGNING_SECRET, | |
token: process.env.SLACK_BOT_TOKEN, |
// проверка ИНН | |
function isInnValid(inn){ | |
inn = String(inn).replace(/[^0-9]+/g, '').split(''); | |
if ( inn.length == 10 ) { | |
return inn[9] == String((( | |
2*inn[0] + 4*inn[1] + 10*inn[2] + | |
3*inn[3] + 5*inn[4] + 9*inn[5] + | |
4*inn[6] + 6*inn[7] + 8*inn[8] | |
) % 11) % 10); | |
} |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
# Feel free to change this path of course (and keys_zone value as well, but also change the usage of it below). | |
proxy_cache_path /var/www/cache/resized levels=1:2 keys_zone=resizedimages:10m max_size=1G; | |
# Gzip was on in another conf file of mine...You may need to uncomment the next line. | |
#gzip on; | |
gzip_disable msie6; | |
gzip_static on; | |
gzip_comp_level 4; | |
gzip_proxied any; | |
# Again, be careful that you aren't overwriting some other setting from another config's http {} section. |
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services | |
Download the following ZIPs: | |
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
Download the correct GApps for your Android version: | |
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) |
<?php | |
date_default_timezone_set('Europe/London'); // Set this to your local timezone - http://www.php.net/manual/en/timezones.php | |
/** | |
* The root directory where the repos live. | |
* | |
* @var string | |
*/ | |
$root_dir = '/your/root/dir/'; |
imports: | |
# .... | |
- { resource: services/session.yml } | |
framework: | |
# .... | |
session: | |
handler_id: session.handler.memcached |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.