Skip to content

Instantly share code, notes, and snippets.


Dylan Lopez locvfx

View GitHub Profile
locvfx / Table
Last active Mar 18, 2020
SQL Collection
View Table
# Dupplicate Table's Structure
Create table abc select * from def limit 0;
# Copy Table structure and Data
Create table `bf_products_weekly_featured` select * from `bf_products_inventory` WHERE `in_shops` = 'bf_products_weekly_featured' limit 10;
#Select Random record (in huge table)
FROM random AS r1 JOIN
locvfx / nginx.conf
Created Jun 7, 2019 — forked from kmjones1979/nginx.conf
Example NGINX configuration to route based on country code using GeoIP
View nginx.conf
# load dynamic modules
load_module /etc/nginx/modules/;
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log info;
pid /var/run/;
events { worker_connections 1024; }
http {
locvfx /
Created Jun 6, 2019 — forked from bastman/
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see:

$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
locvfx /
Created May 30, 2019 — forked from magnetikonline/
Recursively pre-compress (gzip) CSS/JavaScript/webfont assets for use Nginx and its HttpGzipStaticModule module.
#!/bin/bash -e
function compressResource {
gzip --best "$1" >"$1.gz"
touch --no-create --reference="$1" "$1.gz"
echo "Compressed: $1 > $1.gz"
locvfx / index.html
Created May 22, 2019 — forked from jrue/index.html
HTML & CSS Wheel Of Fortune / Bingo Game
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>Wheel of Fortune Bingo</title>
MIT License
locvfx / function.php
Created May 21, 2019
How To Create a Page When the Theme Is Activated #wordpress
View function.php
if (isset($_GET['activated']) && is_admin()){
$new_page_title = 'This is the page title';
$new_page_content = 'This is the page content';
$new_page_template = ''; //ex. template-custom.php. Leave blank if you don't want a custom page template.
//don't change the code bellow, unless you know what you're doing
$page_check = get_page_by_title($new_page_title);
$new_page = array(
locvfx / wp-disable-plugin-update.php
Created May 15, 2019 — forked from rniswonger/wp-disable-plugin-update.php
WordPress - Disable specific plugin update check
View wp-disable-plugin-update.php
* Prevent update notification for plugin
* Place in theme functions.php or at bottom of wp-config.php
function disable_plugin_updates( $value ) {
if ( isset($value) && is_object($value) ) {
if ( isset( $value->response['plugin-folder/plugin.php'] ) ) {
unset( $value->response['plugin-folder/plugin.php'] );
locvfx / .gitattributes
Created Apr 21, 2019 — forked from nemotoo/.gitattributes
.gitattributes for Unity3D with git-lfs
View .gitattributes
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
View Get random Record (super fast query)
$table_name = '';
$results = array();
$limit = 1;
$sql = "SELECT *
FROM $table_name AS r1 JOIN
FROM $table_name)) AS id)
AS r2
locvfx / php.ini
Created Jan 10, 2019 — forked from fuyuanli/php.ini
Disable Dangerous PHP Functions
View php.ini
disable_functions = "apache_child_terminate, apache_setenv, define_syslog_variables, escapeshellarg, escapeshellcmd, eval, exec, fp, fput, ftp_connect, ftp_exec, ftp_get, ftp_login, ftp_nb_fput, ftp_put, ftp_raw, ftp_rawlist, highlight_file, ini_alter, ini_get_all, ini_restore, inject_code, mysql_pconnect, openlog, passthru, php_uname, phpAds_remoteInfo, phpAds_XmlRpc, phpAds_xmlrpcDecode, phpAds_xmlrpcEncode, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, posix_setuid, posix_uname, proc_close, proc_get_status, proc_nice, proc_open, proc_terminate, shell_exec, syslog, system, xmlrpc_entity_decode"
You can’t perform that action at this time.