An Orrery in pure CSS3 (ok, Sass generated). Still WIP. Having great fun with it!
A Pen by Tady Walsh on CodePen.
import cookielib | |
import os | |
import urllib | |
import urllib2 | |
from bs4 import BeautifulSoup | |
import re | |
# Datos de la cuenta de siding | |
username = "<username>" |
An Orrery in pure CSS3 (ok, Sass generated). Still WIP. Having great fun with it!
A Pen by Tady Walsh on CodePen.
REGEDIT4 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts] | |
"Segoe Print (TrueType)"="consola.ttf" | |
"Segoe Print Bold (TrueType)"="consolab.ttf" |
This is just a jotting of notes on how to embed Faye into a single Rails process. Makes it nice to do simple real time things without the need for a separate Faye server/process.
Also uses Faye Redis to work across load balanced Rails apps.
You also need to copy the compiled javascript into vendor/assets/javascripts
and include into application.js
manifest.
Ignore the numbers in the file names... just used to add order to the Gist.
This uses the faye/faye Github repo at edc5b42f6560d31eae61caf00f6765a90e1818d1
since I wanted to use with the Puma rack server and that is only available in the master branch (until Faye 1.0)
### Install Oracle Java 8, this means you agree to their binary license!! | |
cd ~ | |
sudo add-apt-repository -y ppa:webupd8team/java | |
sudo apt-get update | |
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections | |
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections | |
sudo aptitude -y install oracle-java8-installer | |
### Download and Install ElasticSearch |
#!/usr/bin/env ruby | |
# checkout the readme from the master branch | |
`git checkout gh-pages; git checkout master README.md` | |
path = `pwd`.gsub(/\n/, "") | |
readme_path = File.join(path, "README.md") | |
index_path = File.join(path, "index.md") | |
# write the index readme file |
const repl = require('repl'); | |
const babel = require('babel-core'); | |
function preprocess(input) { | |
const awaitMatcher = /^(?:\s*(?:(?:let|var|const)\s)?\s*([^=]+)=\s*|^\s*)(await\s[\s\S]*)/; | |
const asyncWrapper = (code, binder) => { | |
let assign = binder ? `global.${binder} = ` : ''; | |
return `(function(){ async function _wrap() { return ${assign}${code} } return _wrap();})()`; | |
}; |
import com.google.api.client.auth.oauth2.Credential; | |
import com.google.api.client.auth.oauth2.TokenResponse; | |
import com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeFlow; | |
import com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeRequestUrl; | |
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential; | |
import com.google.api.client.googleapis.auth.oauth2.GoogleTokenResponse; | |
import com.google.api.client.http.GenericUrl; | |
import com.google.api.client.http.HttpRequest; | |
import com.google.api.client.http.HttpRequestFactory; | |
import com.google.api.client.http.HttpTransport; |
zappa invoke --raw 'import subprocess; print subprocess.check_output("ls");' |
With the release of Node 6.0.0, the surface of code that needs transpilation to use ES6 features has been reduced very dramatically.
This is what my current workflow looks like to set up a minimalistic and fast microservice using micro and async
+ await
.