The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
| #!/usr/bin/env bash | |
| # | |
| # This is an adaptation of code I wrote to download a private binary from GitHub. Such...pain. | |
| # Why can't GitHub just offer a standardized URL you can download a release binary from and attach | |
| # your Github Personal Access Token as a header? | |
| # | |
| # Since this code is an adaptation it hasn't been directly tested, but the code it was adapted from works | |
| # and hopefully you can get the missing piece you're after by looking here. | |
| # |
| Cross IP Settings | |
| Maximum simultaneous requests 0 Default: 4 | |
| Minimum delay between requests (milliseconds) 100 Default: 200 | |
| IP Settings | |
| Maximum simultaneous requests per ip 0 Default: 1 | |
| Minimum delay between requests to the same ip (milliseconds) 200 Default: 1000 | |
| Frontend request Settings | |
| Maximum simultaneous sync requests 12 Default: 8 |
| <?php | |
| /** | |
| * Hook into order API response to add custom field data. | |
| * | |
| * @param $order_data array | |
| * @param $order WC_Order | |
| * @param $fields array | |
| * @param $server array | |
| * |
| #!/usr/bin/env bash | |
| set -xu | |
| RUBY_VERSION=2.4.1 | |
| LIBSSL_VERSION=$(dpkg -s libssl1.0.0 | grep -i ^version | awk '{print $2;}') | |
| apt-get update -y | |
| apt-get upgrade -y | |
| apt-get install -y git ssh-pass |
| #! /bin/bash | |
| # | |
| # Diffusion youtube avec ffmpeg | |
| # Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée. | |
| VBR="2500k" # Bitrate de la vidéo en sortie | |
| FPS="30" # FPS de la vidéo en sortie | |
| QUAL="medium" # Preset de qualité FFMPEG | |
| YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube |
| #!/bin/bash | |
| NOW=$(date +%Y%m%d%H%M%S) | |
| SQL_FILE=${NOW}_database.sql | |
| # Backup database | |
| wp db export ../backups/$SQL_FILE --add-drop-table | |
| # Compress the database file | |
| gzip ../backups/$SQL_FILE |
As configured in my dotfiles.
start new:
tmux
start new with session name:
Without wasting much time, Let us get started!
Follow these simple instructions:
Step 1: Login into your WHM panel and using easyapache enable Memcache
Step 2: SSH into your server and fire this command yum install memcached.x86_64 php-pecl-memcache.x86_64
| <?php | |
| // Warning: this will overwrite every post in your database | |
| // BACKUP FIRST! | |
| clean_post_content(); | |
| function clean_post_content() { | |
| $posts = get_posts(array( | |
| 'post_type' => array('post'), // or page, or cpt | |
| 'post_status' => 'publish', // or any, draft, etc |