View gist:758e36120f6a106328698379682c828a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const dev = process.env.NODE_ENV !== 'production'; | |
if (dev) { | |
require('dotenv').config(); | |
} | |
const { parentPort } = require('worker_threads'); | |
const Cabin = require('cabin'); | |
const { Signale } = require('signale'); | |
// initialize cabin |
View gist:55aacbf0f523119a225fae4c3cf9fdb9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
maven { url 'https://plugins.gradle.org/m2/' } // Gradle Plugin Portal | |
} | |
dependencies { | |
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.10.0, 0.99.99]' | |
} | |
} | |
View gist:e7276b13a5526d52c7745b3c36e87da3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://documentation.onesignal.com/reference#create-notification | |
var request = require('request'); | |
var Promise = require("bluebird"); | |
// email, templateId are required | |
module.exports = async function (email, templateId, payload) { | |
var message = '', heading = '', subtitle = ''; | |
var restKey = process.env.ONE_SIGNAL_REST_KEY; | |
var appID = process.env.ONE_SIGNAL_APP_ID; |
View gist:d4cf17590430ec639db596e41c36d831
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.application' | |
ext { | |
supportlib_version = '23.3.0' | |
} | |
subprojects { | |
project.configurations.all { | |
resolutionStrategy.eachDependency { details -> | |
if (details.requested.group == 'com.android.support' |
View gist:ed4a4a3ab5f9e2228c5772df1c8a901a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Observed package id 'add-ons;addon-google_apis-google-19' in inconsistent location '/usr/local/Cellar/android-sdk/24/add-ons/addon-google_apis-google-19-1' (Expected '/usr/local/Cellar/android-sdk/24/add-ons/addon-google_apis-google-19') | |
Already observed package id 'add-ons;addon-google_apis-google-19' in '/usr/local/Cellar/android-sdk/24/add-ons/addon-google_apis-google-19'. Skipping duplicate at '/usr/local/Cellar/android-sdk/24/add-ons/addon-google_apis-google-19-1' | |
Observed package id '..;..;..;var;lib;android-sdk;samples;android-15' in inconsistent location '/usr/local/Cellar/android-sdk/24/samples/android-15' (Expected '/usr/local/Cellar/android-sdk/24/../../../var/lib/android-sdk/samples/android-15') | |
Observed package id '..;..;..;var;lib;android-sdk;samples;android-17' in inconsistent location '/usr/local/Cellar/android-sdk/24/samples/android-17' (Expected '/usr/local/Cellar/android-sdk/24/../../../var/lib/android-sdk/samples/android-17') | |
Observed package id '..;..;..;var;lib;android-sdk;samples;androi |
View auto resizer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function extend($) { | |
$.fn.autoSizr = function(options) { | |
var el, elements, _i, _len, _results | |
elements = $(this) | |
if (elements.length < 0) { | |
return | |
} | |
_results = [] | |
for (_i = 0, _len = elements.length; _i < _len; _i++) { | |
el = elements[_i] |
View gist:cb71850937c0341a9b06a7f8fdee14fd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function PgConnectionArgFilter( | |
builder, | |
{ pgInflection: inflection } | |
) { | |
builder.hook( | |
"init", | |
( | |
_, | |
{ | |
addType, |
View autoSizr.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.autoSizr = function () { | |
var el, elements, _i, _len, _results; | |
elements = $(this); | |
if (elements.length < 0) { | |
return; | |
} | |
_results = []; | |
for (_i = 0, _len = elements.length; _i < _len; _i++) { | |
el = elements[_i]; | |
_results.push((function(el) { |
View gist:6761a6a0fb8ae1c840052c5bd471df1d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var itemCount = getCookie("itemCount"); | |
if (itemCount !== "") { | |
$(".cart").text("(" + itemCount + ")"); | |
} | |
function addToCart(btn, itemCode) { | |
addToCartApi(btn, itemCode); |
View gist:07367be32f528e52ce0d97b834474b93
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
webpack: (config) => { | |
config.module.rules.push( | |
// yaml | |
{ | |
test: /\.yaml$/, | |
use: [ | |
{ | |
loader: 'emit-file-loader', | |
options: { |
NewerOlder