Skip to content

Instantly share code, notes, and snippets.

View indatawetrust's full-sized avatar
🏠
Working from home

indatawetrust

🏠
Working from home
View GitHub Profile
/**--------------------------------------------------------------------------------
*
* Copyright (c) 2016, Samsung Electronics Co., Ltd
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@indatawetrust
indatawetrust / client.js
Last active April 3, 2018 14:08
Lightstreamer web client
/*
* LIGHTSTREAMER - www.lightstreamer.com
* Lightstreamer Web Client
* Version 7.1.2 build 1749
* Copyright (c) Lightstreamer Srl. All Rights Reserved.
* Contains: LightstreamerClient, Subscription, StaticGrid, Promise
* Globals
*/
(function(){function define(a,c,e){define.a[a]={e:c,d:e}}define.a={};define.b=function(a,c,e){for(var g=[],f=0;f<a.length;f++){var d=define.a[a[f]];if(!d)throw"All the modules must already be 'defined' Async load not supported: use a full-featured AMD loader like requirejs";d.c||define.b(d.e,d.d,a[f]);g.push(d.c)}a=c.apply(null,g);if(e)define.a[e].c=a};function require(a,c){define.b(a,c,null)};define("IllegalStateException",[],function(){function e(e){this.name="IllegalStateException";this.message=e}e.prototype={toString:function(){return["[",this.name,this.message,"]"].join("|")}};return e});
define("Environment",["IllegalStateException"],function(e){var g="undefined"!==typeof window&&"undefined"!==typeof navigator&&"undefined"!==typeof document,c="undefined"!==typeof impo
<html><head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<title>Application Error</title>
<style media="screen">
html,body,iframe {
margin: 0;
padding: 0;
}
html,body {
<script>
console.log(window.parent.window.location.href)
</script>
var data = [
{
"countryName":"Afghanistan",
"countryShortCode":"AF",
"regions":[
{
"name":"Badakhshan",
"shortCode":"BDS"
},
{
var module = {};
module.exports = {};
var exports = {};
// https://github.com/yanatan16/nanoajax
function getRequest(e){return e&&global.XDomainRequest&&!/MSIE 1/.test(navigator.userAgent)?new XDomainRequest:global.XMLHttpRequest?new XMLHttpRequest:void 0}function setDefault(e,t,o){e[t]=e[t]||o}var reqfields=["responseType","withCredentials","timeout","onprogress"];exports.ajax=function(e,t){function o(e,o){return function(){if(!a){try{t(void 0===u.status?e:u.status,0===u.status?"Error":JSON.parse(u.response||u.responseText||o),u)}catch(r){t(void 0===u.status?e:u.status,0===u.status?"Error":u.response||u.responseText||o,u)}a=!0}}}var r=e.headers||{},s=e.body,n=e.method||(s?"POST":"GET"),a=!1,u=getRequest(e.cors);u.open(n,e.url,!0);var i=u.onload=o(200);u.onreadystatechange=function(){4===u.readyState&&i()},u.onerror=o(null,"Error"),u.ontimeout=o(null,"Timeout"),u.onabort=o(null,"Abort"),s&&(setDefault(r,"X-Requested-With","XMLHttpRequest"),global.FormData&&s instanceof global.FormData||setDefault(r,"Content-
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@indatawetrust
indatawetrust / gist:9687d859a7ccc6ae5c8e29a0dd0c6cc0
Created December 18, 2017 13:43
Republish phoenix framework application
MIX_ENV=prod mix compile --force
pokill 4001
MIX_ENV=prod PORT=4001 elixir --detached -S mix do compile, phx.server
var interval = (func, bind, time) => {
this.interval = setInterval(func.bind(this, ...bind), time)
this.die = clearInterval.bind(null, this.interval)
}
interval(i => {
console.log(i)
@indatawetrust
indatawetrust / download.sh
Created October 3, 2017 13:50
download mp3
downloadmp3() { youtube-dl --extract-audio --audio-format mp3 https://www.youtube.com/watch\?v\=$1 --verbose; }