Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
| /** | |
| * Luhn algorithm in JavaScript: validate credit card number supplied as string of numbers | |
| * @author ShirtlessKirk. Copyright (c) 2012. | |
| * @license WTFPL (http://www.wtfpl.net/txt/copying) | |
| */ | |
| var luhnChk = (function (arr) { | |
| return function (ccNum) { | |
| var | |
| len = ccNum.length, | |
| bit = 1, |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
| #! /bin/bash | |
| ### BEGIN INIT INFO | |
| # Provides: redis-server | |
| # Required-Start: $remote_fs $syslog | |
| # Required-Stop: $remote_fs $syslog | |
| # Should-Start: $local_fs | |
| # Should-Stop: $local_fs | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: redis-server - Persistent key-value db |
| <?php | |
| /** | |
| * [list_searcheable_acf list all the custom fields we want to include in our search query] | |
| * @return [array] [list of custom fields] | |
| */ | |
| function list_searcheable_acf(){ | |
| $list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF"); | |
| return $list_searcheable_acf; | |
| } |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| ssl_certificate cert.pem; | |
| ssl_certificate_key cert.key.pem; | |
| ssl_trusted_certificate cert.ca.pem; | |
| ssl_dhparam cert.dh.pem; | |
| ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
| ssl_ciphers FIPS@STRENGTH:!aNULL:!eNULL; | |
| ssl_prefer_server_ciphers on; | |
| ssl_session_cache shared:SSL:10m; |
| <?php | |
| use Illuminate\Console\Command; | |
| use Illuminate\Filesystem\Filesystem; | |
| class ViewsCommand extends Command { | |
| /** | |
| * The console command name. | |
| * | |
| * @var string |
| <?php | |
| /** | |
| * Plugin Name: WP PASSWORD_BCRYPT | |
| * Plugin URI: http://bitpiston.com/ | |
| * Description: Replaces wp_hash_password and wp_check_password's phpass hasher with PHP 5.5's password_hash and password_verify using bcrypt. | |
| * Author: BitPiston Studios | |
| * Author URI: http://bitpiston.com/ | |
| * Version: 1.2 | |
| * Licence: BSD | |
| */ |
| <?php | |
| /** | |
| * Plugin Name: WP ACF Obj Cache Fix | |
| * Plugin URI: http://bitpiston.com/ | |
| * Description: Fix for Advanced Custom Fields expiry with 3rd party Object Caches. | |
| * Author: BitPiston Studios | |
| * Author URI: http://bitpiston.com/ | |
| * Version: 1.1.1 | |
| * Licence: BSD | |
| */ |
| server { | |
| listen 80; | |
| listen [::]:80; | |
| server_name bitpiston.com; | |
| root /home/bitpiston/www; | |
| #access_log /var/log/nginx/bitpiston.com-access.log; | |
| access_log off; | |
| error_log /var/log/nginx/bitpiston.com-error.log; |