Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| #!/bin/sh | |
| docker rm -f $(docker ps -qa) | |
| docker volume rm $(docker volume ls -q) | |
| cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke" | |
| for dir in $cleanupdirs; do | |
| echo "Removing $dir" | |
| rm -rf $dir | |
| done |
| #!/bin/bash | |
| user=$EUID | |
| if [ "${user}" != "0" ]; then | |
| echo | |
| echo "$0 must be run as root - you are running as $EUID" | |
| echo | |
| exit 1 | |
| fi | |
| echo | |
| echo "About to clean Rancher 2.x custom node" |
| --- | |
| apiVersion: v1 | |
| kind: ServiceAccount | |
| metadata: | |
| name: nfs-provisioner | |
| --- | |
| kind: ClusterRole | |
| apiVersion: rbac.authorization.k8s.io/v1 | |
| metadata: | |
| name: nfs-provisioner-runner |
| # calculating RSI (gives the same values as TradingView) | |
| # https://stackoverflow.com/questions/20526414/relative-strength-index-in-python-pandas | |
| def RSI(series, period=14): | |
| delta = series.diff().dropna() | |
| ups = delta * 0 | |
| downs = ups.copy() | |
| ups[delta > 0] = delta[delta > 0] | |
| downs[delta < 0] = -delta[delta < 0] | |
| ups[ups.index[period-1]] = np.mean( ups[:period] ) #first value is sum of avg gains |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| default_type text/html; | |
| access_log /dev/stdout; | |
| sendfile on; | |
| keepalive_timeout 65; |
Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| set nocompatible " be iMproved | |
| filetype on "Avoid errors on close | |
| filetype off " required! | |
| set rtp+=~/.vim/bundle/vundle/ | |
| call vundle#rc() | |
| " Bundles {{{- | |
| " let Vundle manage Vundle | |
| " required! |
| #define ANALOG_IN 0 | |
| void setup() { | |
| Serial.begin(9600); | |
| //Serial.begin(115200); | |
| } | |
| void loop() { | |
| int val = analogRead(ANALOG_IN); | |
| Serial.write( 0xff ); |
| /* | |
| * Oscilloscope | |
| * Gives a visual rendering of analog pin 0 in realtime. | |
| * | |
| * This project is part of Accrochages | |
| * See http://accrochages.drone.ws | |
| * | |
| * (c) 2008 Sofian Audry (info@sofianaudry.com) | |
| * | |
| * This program is free software: you can redistribute it and/or modify |
| #!/bin/bash | |
| # Autor: Nilton OS -- www.linuxpro.com.br | |
| echo 'setup-web2py-nginx-uwsgi-centos64.sh' | |
| echo 'Support CentOS 6.4' | |
| echo 'Installs Nginx 1.4.1 + uWSGI + Web2py' | |
| # Get Web2py Admin Password | |
| echo -e "Web2py Admin Password: \c " | |
| read PW |