When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}
"use strict"; | |
// Load plugins | |
const autoprefixer = require("autoprefixer"); | |
const browsersync = require("browser-sync").create(); | |
const cp = require("child_process"); | |
const cssnano = require("cssnano"); | |
const del = require("del"); | |
const eslint = require("gulp-eslint"); | |
const gulp = require("gulp"); |
// save as index.js | |
// npm install https://github.com/GoogleChrome/puppeteer/ | |
// node index.js URL | |
const puppeteer = require('puppeteer'); | |
(async () => { | |
const url = process.argv[2]; | |
const browser = await puppeteer.launch(); | |
// use tor | |
//const browser = await puppeteer.launch({args:['--proxy-server=socks5://127.0.0.1:9050']}); |
Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources (e.g. fonts) on a web page to be requested from another domain outside the domain from which the first resource was served. This is set on the server-side and there is nothing you can do from the client-side to change that setting, that is up to the server/API. There are some ways to get around it tho.
Sources : MDN - HTTP Access Control | Wiki - CORS
CORS is set server-side by supplying each request with additional headers which allow requests to be requested outside of the own domain, for example to your localhost
. This is primarily set by the header:
Access-Control-Allow-Origin
An example that shows the difference between creating a JavaScript class and subclass in ES5 and ES6.
This add-on is to:
audio
or video
~/Music/youtube-dl
note Since the latest update of youtube-dl (2015.08.23) and OSX (10.10.4), there is no need to bypass certificate anymore. The proxy also seems to be fixed (by importing system proxy.. maybe). However, the options will remain until I'm sure to take them out later.
First do (to load git-completion.bash
):
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.git-prompt.sh
curl -OL http://github.com/git/git/raw/master/contrib/completion/git-completion.bash
Then change the name of git-completion
to .git-completion
:
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
# Steps to build and install tmux from source. | |
# Takes < 25 seconds on EC2 env [even on a low-end config instance]. | |
VERSION=2.7 | |
sudo yum -y remove tmux | |
sudo yum -y install wget tar libevent-devel ncurses-devel | |
wget https://github.com/tmux/tmux/releases/download/${VERSION}/tmux-${VERSION}.tar.gz | |
tar xzf tmux-${VERSION}.tar.gz | |
rm -f tmux-${VERSION}.tar.gz | |
cd tmux-${VERSION} |
# Built application files | |
/*/build/ | |
# Crashlytics configuations | |
com_crashlytics_export_strings.xml | |
# Local configuration file (sdk path, etc) | |
local.properties | |
# Gradle generated files |