Pattern below allows for a bash script to be called via, say, cron and check to see if it is already running.
Useful for things like rsync
tasks.
PIDFILE=/var/run/myscriptname.pid
if [ -f $PIDFILE ]
then
PID=$(cat $PIDFILE)
Pattern below allows for a bash script to be called via, say, cron and check to see if it is already running.
Useful for things like rsync
tasks.
PIDFILE=/var/run/myscriptname.pid
if [ -f $PIDFILE ]
then
PID=$(cat $PIDFILE)
#!/bin/bash | |
#nttuyen | |
USER_ID=47054 | |
cache_file=/tmp/key_cache | |
function dl_keys { | |
curl -m 10 -sf https://gitlab.com/api/v4/users/$1/keys | jq -r '.[].key' | |
} |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
<?php | |
/** | |
* PDO Session Handler | |
* @author Daniel15 <dan.cx> | |
* | |
* modificata da carlo@chierotti.net | |
* per gestire la scadenza della sessione | |
* | |
* testata in PHP53, se si passa a PHP54 si potrebbe utilizzare |
{ | |
config: { | |
title: "Bội chi ngân sách Nhà nước 2014", | |
width: 1000, // Độ rộng biểu đồ | |
height: 300, // Chiều cao biểu đồ | |
groupWidth: 0, // Dộ rộng cột của biểu đồ | |
isStacked: false | |
}, | |
columns: ['Bội chi ngân sách'], | |
data: [ |
{ | |
gists: [ | |
'https://api.github.com/gists/b346dd60a98a3c686c80', | |
'https://api.github.com/gists/90c293c95139061d06f2' | |
], | |
charts:[ | |
] | |
} |
config: { | |
title: "Biểu đồ về cái gì đó", | |
width: 900, // Độ rộng biểu đồ | |
height: 400, // Chiều cao biểu đồ | |
groupWidth: 0, // Dộ rộng cột của biểu đồ | |
isStacked: false | |
}, | |
columns: ['Cột 1', 'Cột 2'], | |
data: [ | |
['2014', 10, 12], |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<!--Load the AJAX API--> | |
<script type="text/javascript" src="https://www.google.com/jsapi"></script> | |
<script type="text/javascript"> | |
// Load the Visualization API and the piechart package. | |
google.load('visualization', '1.0', {'packages':['corechart']}); |
#!/bin/bash | |
ENV_DIR=~/.environments | |
ENV_HOME=$ENV_DIR | |
#Process JAVA with JDK | |
DEFAULT_JDK_VERSION=7 | |
DEFAULT_JDK_HOME=$ENV_DIR/jdk | |
function setup_jdk() { | |
#Process old version of jdk |