sa
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
from flask import Flask, render_template, request, jsonify | |
from pusher import Pusher | |
import json | |
# create flask app | |
app = Flask(__name__) | |
# index route, shows index.html view | |
@app.route('/') |
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 | |
set -ex | |
# make output directory | |
ARCHIVE=/tmp/archives | |
FLIST=/tmp/flist | |
mkdir -p $ARCHIVE | |
# install system deps (done) |
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
------------------------------------------------------------------ | |
-- | |
-- Author: Alexey Melnichuk <alexeymelnichuck@gmail.com> | |
-- | |
-- Copyright (C) 2013-2016 Alexey Melnichuk <alexeymelnichuck@gmail.com> | |
-- | |
-- Licensed according to the included 'LICENCE' document | |
-- | |
-- This file is part of lua-path library. | |
-- |
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
firebase : da 3shan database ( Get w set w delete ) 3n tre2 API | |
(car wash GP) project name | |
t3lem mn new boston | |
https://www.youtube.com/playlist?list=PL6gx4Cwl9DGBsvRxJJOzG4r4k_zLKrnxl | |
t3lem mn firebase with android |
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
[startup.wiki] | |
name = "bash" | |
protected = true #set protected to true to respawn the container if it crashed | |
[startup.wiki.args] | |
script = """ | |
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ | |
locale-gen | |
export HOME=/root | |
export LANG=en_US.UTF-8 |
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
from Jumpscale import j | |
builder_method = j.builder.system.builder_method | |
class BuilderGolang(j.builder.system._BaseClass): | |
NAME = 'go' | |
STABLE_VERSION = '1.12' | |
DOWNLOAD_URL = 'https://dl.google.com/go/go{version}.{platform}-{arch}.tar.gz' |
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
from Jumpscale import j | |
def main(self): | |
""" | |
to run: | |
kosmos 'j.data.bcdb.test(name="dns_manager")' | |
test around acls |
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/sh | |
# prepare ssh | |
[ -d /etc/ssh/ ] && chmod 400 -R /etc/ssh/ | |
mkdir -p /run/sshd | |
[ -d /root/.ssh/ ] || mkdir /root/.ssh | |
chmod +x /opt/bin/* | |
mkdir -p /var/log/postgres | |
mkdir -p /var/log/gitea |
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
#!/usr/bin/env bash | |
set -Eeo pipefail | |
# TODO swap to -Eeuo pipefail above (after handling all potentially-unset variables) | |
# usage: file_env VAR [DEFAULT] | |
# ie: file_env 'XYZ_DB_PASSWORD' 'example' | |
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of | |
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) | |
file_env() { | |
local var="$1" |
OlderNewer