Storing application variables in a 'hidden' file called .env
?
Need to load these variables for dev/testing but didn't start jupyter notebook
with them already exported?
Just drop the following into a Python 3 cell.
package main | |
import ( | |
"errors" | |
"fmt" | |
"os" | |
"github.com/go-kit/log" | |
) |
dokku() { docker exec -i "$(docker ps|awk '$2=="sebble/dokku"{print $1}'|head -1)" sudo dokku "$@"; } |
#!/bin/sh | |
# Configuration | |
INTERVAL=10 # (seconds) | |
LASTRUN=".lastrun" # (optional) | |
# Run_per logic | |
NOW=$(date +%s) | |
test -f "$LASTRUN" && THEN=$(cat "$LASTRUN") || THEN=0 | |
test $INTERVAL -gt $(($NOW - $THEN)) && exit 0 |
#!/bin/bash | |
USER=${1:-sebble} | |
STARS=$(curl -sI https://api.github.com/users/$USER/starred?per_page=1|egrep '^Link'|egrep -o 'page=[0-9]+'|tail -1|cut -c6-) | |
PAGES=$((658/100+1)) | |
echo You have $STARS starred repositories. | |
echo |
<!doctype html> | |
<meta charset=utf-8> | |
<title>THEAD</title> | |
<!-- Basic Style --> | |
<style> | |
table { | |
font-size: 3rem; | |
} | |
th, td { |
import { Component } from '@angular/core'; | |
import { NginxlogService } from './nginxlog.service'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'] | |
}) | |
export class AppComponent { | |
title = 'app works!'; |
dotdotdot() { while sleep ${1:-10};do echo -n .;done; } |
#!/usr/bin/env python | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
from SocketServer import TCPServer | |
from requests import get | |
from os import environ | |
cache = {} | |
user = environ.get('GITHUB_USERNAME','sebble') | |
def find(key): |
<!doctype html> | |
<meta charset=utf-8> | |
<title>ES6+Loaders</title> | |
<script data-main=./index>/*Stuk/require1k*/R=function(e,n,v1){function t(e,o,u,a){if(e.g)return o(e.e,e);var c=e.g=e.l,f=new XMLHttpRequest;f.onload=function(i,l){function s(){l--||o(n,e)}200==f.status||e.t?(i=[],(e.t=e.t||f.response).replace(/(?:^|[^\w\$_.])require\s*\(\s*["']([^"']*)["']\s*\)/g,function(e,n){i.push(n)}),l=i.length,i.map(function(o){t(r(e.l,o),s,"."!=o[0]?c+"/../":n,o)}),s()):u?t(e.n=r(u+="../",a),o,u,a):(e.e=f,o(f,e))},e.t?f.onload():(f.open("GET",c,!0),f.send())}function r(e,n,t){if(e.e)throw e.e;return n?(f.href=e,i.href="."!=n[0]?"./node_modules/"+n:n,t=i.href+".js",f.href="",u[t]=u[t]||{l:t}):e.n?r(e.n):(e[c]||(e.f||a("(function(require,"+c+",module){"+e.t+"\n})//# sourceURL="+e.l))(function(n){return r(r(e.l,n))},e[c]={},e),e[c])}function o(e,n){t(e.call?{l:"",t:""+e,f:e}:r("",e),function(t,o){try{e=r(o)}catch(u){t=u}n&&n(t,e)})}var u={},a=eval,c="createElement",f=e[c]("base"),i=e[c]("a");return e.head.appendChild(f),c=e |
Storing application variables in a 'hidden' file called .env
?
Need to load these variables for dev/testing but didn't start jupyter notebook
with them already exported?
Just drop the following into a Python 3 cell.