Skip to content

Instantly share code, notes, and snippets.

View srph's full-sized avatar
🛠️
Building @Stride-Labs Frontend

Kier Borromeo srph

🛠️
Building @Stride-Labs Frontend
View GitHub Profile
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}">
@srph
srph / index.html
Created February 3, 2017 17:38 — forked from dreyescat/index.html
Webpack config to expose bundle in a variable in the global context
<html>
<head>
</head>
<body>
<script src="lib/yourlib.js"></script>
<script>
window.onload = function () {
EntryPoint.run();
};
</script>
@srph
srph / gist:eefd7db283c66a86aa61e58ddd93c1ce
Created September 25, 2016 21:09 — forked from Urbiwanus/gist:c1e456f889f53e940a11
Cordova Paypal Integration AngularJS
app.factory('PaypalService', ['$q', '$ionicPlatform', 'shopSettings', '$filter', '$timeout', function ($q, $ionicPlatform, shopSettings, $filter, $timeout) {
var init_defer;
/**
* Service object
* @type object
*/
var service = {
@srph
srph / immutable-libraries.md
Created August 25, 2016 21:33 — forked from jlongster/immutable-libraries.md
List of immutable libraries

A lot of people mentioned other immutable JS libraries after reading my post. I thought it would be good to make a list of available ones.

There are two types of immutable libraries: simple helpers for copying JavaScript objects, and actual persistent data structure implementations. My post generally analyzed the tradeoffs between both kinds of libraries and everything applies to the below libraries in either category.

Libraries are sorted by github popularity.

Persistent Data Structures w/structural sharing

if (
process.env.NODE_ENV === 'production' &&
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ &&
Object.keys(window.__REACT_DEVTOOLS_GLOBAL_HOOK__._renderers).length
) {
window.__REACT_DEVTOOLS_GLOBAL_HOOK__._renderers = {}
}
@srph
srph / gist:e53d2db462f05c669f43
Created December 31, 2015 17:04 — forked from vistajess/gist:f54989f61c82642663c5
Send a Facebook Chat to Friends using Browser Console
// target the every anchor element (friend in friendlist)
var elem = document.querySelectorAll("a._55ln");
for(var i=0 in elem) {
// trigger the anchor element
elem[i].click();
//target the text area
var textArea = document.getElementsByClassName("uiTextareaAutogrow _552m");
var chatBox = textArea[0];
// message value here
chatBox.value = "Hello, This is a test chat from console please dont reply";
@srph
srph / index.js
Last active August 29, 2015 14:27 — forked from vistajess/gist:b5d6d97ddf522eea3ccf
Sample Modular JS Pattern
(function() {
var customer = {
customer: [],
filter: '',
init: function() {
this.cacheDOM();
this.bindEvents();
this.render();
},
cacheDOM: function() {

SSL upgrades on rubygems.org and RubyInstaller versions

UPDATE 2014-12-21: RubyGems 1.8.30, 2.0.15 and 2.2.3 have been released. It requires manual installation, please see instructions below.


Hello,

If you reached this page, means you've hit this SSL error when trying to

// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@srph
srph / watch.sh
Last active August 29, 2015 14:17 — forked from mikesmullin/watch.sh
#!/usr/bin/env bash
# script: watch
# author: Mike Smullin <mike@smullindesign.com>
# license: GPLv3
# description:
# watches the given path for changes
# and executes a given command when changes occur
# usage:
# watch <path> <cmd...>
#