Skip to content

Instantly share code, notes, and snippets.

View kabadabra's full-sized avatar

KaBaDaBrA kabadabra

View GitHub Profile
@yugaego
yugaego / install.md
Last active June 13, 2019 18:34
Mac OS 10.13 High Sierra Install PHP 7.0 Apache MariaDB With Homebrew
@jason-engage
jason-engage / gist:e072cc300fd789e8841e
Last active June 8, 2017 15:26
Ionic Register Push Function Example with Payload and ionicPopup for Android and IOS
//Here is the curl commands I use to test - make sure you update the CAPSVARS. You can add an item ID Payload or not.
//For example if your app displays items, it can navigate to a specific item.
//If you want to add more state names, instead of only going to specific items:
//add another payload property called 'stateName'
//create a goState() function to accept a stateName as a parameter
//and modify the registerPush() to find the stateName property and pass into your goState().
//Android
curl -u YOURAPIKEY: -H "Content-Type: application/json" -H "X-Ionic-Application-Id: APPID" https://push.ionic.io/api/v1/push -d '{"tokens":["ANDROIDTOKEN"],"notification":{"alert":"I come from planet Ion.", "android":{"title":"This is a title2", "payload":{"sound":"notification.mp3","itemId":"7TF00hJI78Y"}}}}'
@leeroybrun
leeroybrun / turn_all_off.lua
Last active March 1, 2021 05:59
Fibaro LUA scenes
--[[
%% autostart
%% properties
%% globals
--]]
NB_DEVICES = 300
function turnAllOff()
fibaro:debug('Turn all devices off.')
@wycks
wycks / gist:2315295
Created April 6, 2012 00:08
Rewrite static theme assets and plugins directory (WordPress)
<?php
// rewrite /wp-content/themes/theme-name/css/ to /css/
// rewrite /wp-content/themes/theme-name/js/ to /js/
// rewrite /wp-content/themes/theme-name/img/ to /img/
// rewrite /wp-content/plugins/ to /plugins/
function roots_flush_rewrites() {
global $wp_rewrite;
$wp_rewrite->flush_rules();
}
@jonathonbyrdziak
jonathonbyrdziak / CustomWidgetFile.php
Last active September 29, 2022 22:00
EMPTY WIDGET Plugin code to create a single widget in wordpress.
<?php
/**
* Duplicate this file as many times as you would like, just be sure to change the
* Empty_Widget class name to a custom name of your choice. Have fun! redrokk.com
*
* Plugin Name: Empty Widget
* Description: Single Widget Class handles all of the widget responsibility, all that you need to do is create the html. Just use Find/Replace on the Contact_RedRokk_Widget keyword to rebrand this class for your needs.
* Author: RedRokk Interactive Media
* Version: 1.0.0
* Author URI: http://www.redrokk.com