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
#! /bin/bash | |
# simple update, nothing fancy, gets things done | |
# run from the parent folder CWD (all repos will are siblings) | |
# EDIT: this is the Org for the repos | |
GH_ORG="adobe" | |
# EDIT: this is the base url for the repos (Github.com) | |
BASE_URL="https://github.com/$GH_ORG" | |
# EDIT: add the repo name to this list |
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
// @flow | |
import * as React from 'react'; | |
import {asyncComponent} from 'react-async-component'; | |
export const loaderMaker = (bgColor: string = 'transparent') => () => ( | |
<div style={{position: 'absolute', width: '100%', height: '100%', backgroundColor: bgColor}} /> | |
); | |
const MAX_RETRIES = 3; | |
const STARTING_BACKOFF = 500; |
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 http = require('http'); | |
const express = require('express'); | |
const app = express(); | |
const isDevMode = process.env.NODE_ENV === 'development'; | |
const history = require('connect-history-api-fallback'); | |
app.use(require('morgan')('short')); | |
app.use(history()); |
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
#!/bin/bash | |
# | |
# Originally found at https://github.com/mark-adams/docker-chromium-xvfb/blob/master/images/base/xvfb-chromium | |
# and modified to work with google-chrome instead of chromium | |
_kill_procs() { | |
kill -TERM $chrome | |
wait $chrome | |
kill -TERM $xvfb | |
} |
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 gulp = require("gulp"); | |
var browserify = require("browserify"); | |
var babelify = require("babelify"); | |
var source = require("vinyl-source-stream"); | |
var config = { | |
src: "index.js", | |
filename: "bundle.js", | |
dest: "./" | |
}; | |
var extensions = ['.js', '.ts', '.json']; |
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
<?php | |
class Signup | |
{ | |
protected static function getSellerInstance($IdSeller = 0) | |
{ | |
return '-' . $IdSeller . '-'; | |
} | |
protected static function getCountryDetails($CountryName) |
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
<html> | |
<head> | |
<title>Select styles with CSS only</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
body { | |
background-color: #fff; | |
font-family: helvetica, sans-serif; | |
margin: 4% 10% | |
} |
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
// Simulate a call to Dropbox or other service that can | |
// return an image as an ArrayBuffer. | |
var xhr = new XMLHttpRequest(); | |
// Use JSFiddle logo as a sample image to avoid complicating | |
// this example with cross-domain issues. | |
xhr.open( "GET", "http://fiddle.jshell.net/img/logo.png", true ); | |
// Ask for the result as an ArrayBuffer. | |
xhr.responseType = "arraybuffer"; |
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
function worker() { | |
setInterval(function() { | |
postMessage({foo: "bar"}); | |
}, 1000); | |
} | |
var code = worker.toString(); | |
code = code.substring(code.indexOf("{")+1, code.lastIndexOf("}")); | |
var blob = new Blob([code], {type: "application/javascript"}); |
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
<head>((?!</head>).|\n)+</head> |
NewerOlder