Skip to content

Instantly share code, notes, and snippets.

View statickidz's full-sized avatar
💯
Focusing

Adrián Barrio Andrés statickidz

💯
Focusing
View GitHub Profile
@statickidz
statickidz / Gruntfile.js
Created February 6, 2016 11:55
Copy new file updates to directory with Grunt
var date = new Date();
module.exports = function(grunt) {
grunt.initConfig({
watch: {
models: {
files: ['application/models/**/*.php'],
tasks: ['copyTask'],
options: {
spawn: false,
},
@statickidz
statickidz / sublime-remove-blank-lines
Last active March 31, 2016 10:40
Sublime Text - Remove any extra/blank lines
Find > Replace (Select regular expression check)
Find What: \s]*$(?!\w\W])
Replace With:
@statickidz
statickidz / genymotionwithplay.txt
Created April 8, 2016 11:06 — forked from wbroek/genymotionwithplay.txt
Genymotion with 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)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
@statickidz
statickidz / wordpress_database_dump.php
Created September 22, 2016 11:40
Dump Wordpress database from PHP
<?php
$wpConfig = $_SERVER['DOCUMENT_ROOT'].'/wp-config.php';
if (file_exists($wpConfig)) {
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($wpConfig));
header('Expires: 0');
header('Cache-Control: must-revalidate');
@statickidz
statickidz / hex_rgba_alpha.txt
Last active October 10, 2018 15:09
Hexadecimal and RGBA alpha values
Opacity % 255 Step 2 digit HEX prefix
0% 0.00 00
5% 12.75 0C
10% 25.50 19
15% 38.25 26
20% 51.00 33
25% 63.75 3F
30% 76.50 4C
35% 89.25 59
40% 102.00 66
@statickidz
statickidz / cronjob-certbot.config
Created July 14, 2019 22:32
Elastic Beanstalk single instance HTTPS with Let's Encrypt
files:
"/etc/cron.d/certbot":
mode: "000644"
owner: root
group: root
content: |
56 1 * * * root /opt/certbot/certbot-auto renew
commands:
remove_old_cron:
command: "rm -f /etc/cron.d/*.bak"

Keybase proof

I hereby claim:

  • I am statickidz on github.
  • I am skidz (https://keybase.io/skidz) on keybase.
  • I have a public key ASBtgRaCsTa5XJbiKIJUcna4qSMa20J-QGFahsoxAq6pjAo

To claim this, I am signing this object:

@statickidz
statickidz / .bash_profile
Last active October 6, 2019 10:04
ANDROID_HOME and JAVA_HOME environment variable for Mac OSX
export JAVA_HOME=$(/usr/libexec/java_home)
export ANDROID_HOME=/Users/$USER/Library/Android/sdk
export ANDROID_SDK_ROOT=/Users/$USER/Library/Android/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
export PATH="$HOME/.fastlane/bin:$PATH"
source ~/.nvm/nvm.sh
@statickidz
statickidz / docker-compose.yml
Created November 5, 2019 11:35
Quick Docker Compose for Wordpress testing (docker-compose up -d)
version: '3.3'
services:
mysql:
image: mysql:5.7.22
volumes:
- ./.mysql:/var/lib/mysql/
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
@statickidz
statickidz / functions.php
Last active February 9, 2020 10:40
Woocommerce - External Links New Tab for Affiliates
<?php
/**
* @snippet Woocommerce - External Links New Tab for Affiliates
* @sourcecode https://gist.github.com/statickidz/72be96dca9cd39331f1fcbdc59392f5b
* @author Adrián Barrio Andrés (statickidz.com)
*/
/**
* Redirect WC external products single to his affiliate link