Skip to content

Instantly share code, notes, and snippets.

View rsurjano's full-sized avatar
:octocat:
Business & Code!

Roy Carlos rsurjano

:octocat:
Business & Code!
View GitHub Profile
@arielsalminen
arielsalminen / package.json
Last active June 18, 2020 21:29
An example on how to use Angular and React outputTargets with Stencil.js. Please note that I’ve removed other configs in order to simplify this example. This is how we’ve configured things in https://www.duetds.com
{
"devDependencies": {
"@stencil/angular-output-target": "latest",
"@stencil/react-output-target": "latest"
}
}
@mediaupstream
mediaupstream / make_certs.sh
Last active July 15, 2024 07:57
extract ca-certs, key, and crt from a pfx file
#!/bin/bash
#
# Usage:
# ./make_certs.sh test.example.com
#
# The required input to make_certs.sh is the path to your pfx file without the .pfx prefix
#
# test.example.com.key
# test.example.com.crt (includes ca-certs)
@forcewake
forcewake / extractTextBetweenCurlyBraces.js
Created June 5, 2015 12:55
Getting content between curly braces in javascript regex
var found = [], // an array to collect the strings that are found
rxp = /{([^}]+)}/g,
str = "a {string} with {curly} braces",
curMatch;
while( curMatch = rxp.exec( str ) ) {
found.push( curMatch[1] );
}
console.log( found ); // ["string", "curly"]
@chrisjhoughton
chrisjhoughton / wait-global.js
Created December 10, 2013 13:02
Wait for a global variable to exist on the page.
var waitForGlobal = function(key, callback) {
if (window[key]) {
callback();
} else {
setTimeout(function() {
waitForGlobal(key, callback);
}, 100);
}
};