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 | |
export CRYFS_FRONTEND=noninteractive | |
export CRYFS_NO_UPDATE_CHECK=noninteractive | |
CLOUD_DIR="${HOME}/.cloud" | |
BASE_DIR="${CLOUD_DIR}/Drive.cryfs" | |
MOUNT_DIR="${CLOUD_DIR}/Drive" | |
CONFIG_FILE="${CLOUD_DIR}/cryfs.config" | |
PASSWORD="mypassword" | |
if [ ! -d "$MOUNT_DIR" ]; then | |
mkdir $MOUNT_DIR |
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 | |
VIRTUAL_USERS_DIR=${VIRTUAL_USERS_DIR:-/ftp_users} | |
DISKS_DIR=${DISKS_DIR:-/ftp_disks} | |
ROOT_DIR=${ROOT_DIR:-/ftp_mountpoints} | |
USER_QUOTA=${USER_QUOTA:-100MB} | |
DEFAULT_FTP_USER_ID=${DEFAULT_FTP_USER_ID:-14} | |
DEFAULT_FTP_GROUP_ID=${DEFAULT_FTP_GROUP_ID:-50} | |
CHMOD=${CHMOD:-0777} |
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
############################################################################### | |
# The MIT License | |
# | |
# Copyright 2012-2014 Jakub Jirutka <[email protected]>. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
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
function promiseAllRecursive(value) { | |
if (value instanceof Promise) { | |
return value; | |
} | |
if (value instanceof Array) { | |
return Promise.all(value.map(promiseAllRecursive)); | |
} |
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
export default function hasPromise(mixed, stack=new Set()){ | |
if(stack.has(mixed)){ | |
return; | |
} | |
stack.add(mixed); | |
if(mixed instanceof Promise){ | |
return true; | |
} | |
if(typeof mixed == 'object' && mixed !== null){ | |
mixed = Object.values(mixed); |
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 | |
git filter-branch --env-filter ' | |
OLD_EMAIL="jo@surikat" | |
CORRECT_NAME="jo" | |
CORRECT_EMAIL="[email protected]" | |
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] | |
then | |
export GIT_COMMITTER_NAME="$CORRECT_NAME" | |
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" |
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 php | |
<?php | |
$rootDir = '/var/www/html/'; | |
$file = '/etc/vsftpd/ftpd.passwd'; | |
$username = getenv('USERNAME') ?: getenv('USER'); | |
if($username!='root'){ | |
echo "You must run this script as root: sudo vsftpd-user ...\n"; | |
exit; | |
} | |
$map = []; |
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 | |
#=============================================================================== | |
# | |
# FILE: getgeo.sh | |
# | |
# USAGE: ./getgeo.sh | |
# | |
# DESCRIPTION: run the script so that the geodata will be downloaded and inserted into your | |
# database | |
# |
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 | |
#=============================================================================== | |
# | |
# FILE: getgeo.sh | |
# | |
# USAGE: ./getgeo.sh | |
# | |
# DESCRIPTION: run the script so that the geodata will be downloaded and inserted into your | |
# database | |
# |