Let's say you want to host domains first.com
and second.com
.
Create folders for their files:
# Globals | |
repos <- 'https://cloud.r-project.org' | |
pkgdata <- available.packages(repos = repos) | |
pkgs <- row.names(pkgdata) | |
# On success | |
make_callback <- function(i, url){ | |
function(res){ | |
if(res$status == 200){ | |
buf <- rawConnection(res$content) |
#!/usr/bin/env bash | |
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done | |
git fetch --all | |
git pull --all |
// Create a queue to push events and stub all methods | |
window.analytics || (window.analytics = {}); | |
window.analytics_queue || (window.analytics_queue = []); | |
(function() { | |
var methods = ['identify', 'track', 'trackLink', 'trackForm', 'trackClick', 'trackSubmit', 'page', 'pageview', 'ab', 'alias', 'ready', 'group', 'on', 'once', 'off']; | |
var factory = function(method) { | |
return function () { | |
var args = Array.prototype.slice.call(arguments); | |
args.unshift(method); |
/** | |
* White theme for reveal.js. This is the opposite of the 'black' theme. | |
* | |
* By Hakim El Hattab, http://hakim.se | |
*/ | |
section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 { | |
color: #fff; } | |
/********************************************* | |
* GLOBAL STYLES |
#MIT License | |
# | |
#Copyright (c) 2017 Daniele Andreis | |
#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: | |
# |
import signal | |
import functools | |
async def looping_task(loop, task_num): | |
try: | |
while True: | |
print('{0}:in looping_task'.format(task_num)) | |
await asyncio.sleep(5.0, loop=loop) | |
except asyncio.CancelledError: | |
return "{0}: I was cancelled!".format(task_num) |
This gist shows how to create a GIF screencast using only free OS X tools: QuickTime and ffmpeg.
Forked from https://gist.github.com/dergachev/4627207. Updated to use a palette to improve quality and skip gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
soft_thresh = function(x, g) { | |
x = as.vector(x) | |
w1 = which(g >= abs(x)) | |
w2 = which(g < abs(x) & x > 0) | |
w3 = which(g < abs(x) & x < 0) | |
ret = x | |
ret[w1] = 0 | |
ret[w2] = x[w2]-g | |
ret[w3] = x[w3]+g | |
ret |
#!/usr/bin/env bash | |
# memusg -- Measure memory usage of processes | |
# Usage: memusg COMMAND [ARGS]... | |
# | |
# Author: Jaeho Shin <[email protected]> | |
# Created: 2010-08-16 | |
############################################################################ | |
# Copyright 2010 Jaeho Shin. # | |
# # | |
# Licensed under the Apache License, Version 2.0 (the "License"); # |