$ redis-cli -eval Redis_queue.lua
This file contains hidden or 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 | |
# Setting this, so the repo does not need to be given on the commandline: | |
export BORG_REPO='*******' | |
# Setting this, so you won't be asked for your repository passphrase: | |
export BORG_PASSPHRASE='*******' | |
# some helpers and error handling: | |
function info () { echo -e "\n"`date` $@"\n" >&2; } |
This file contains hidden or 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 | |
AWS_CLI="aws --region $AWS_REGION" | |
PRICE=0.2 | |
USER_NAME=#USERNAME# | |
KEY_NAME=#KEY NAME# | |
SECURITY_GROUP_ID=#SECURITY GROUP# | |
SUBNET_ID=#SUBNET# | |
VOLUME_SIZE=40 | |
INSTANCE_TYPE=t2.2xlarge |
This file contains hidden or 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 -eo pipefail | |
TOKEN=${GITHUB_TOKEN:?environment variable is empty or unset} | |
[ -n "$1" ] && GITHUB_REPOSITORY=$1 | |
GITHUB_REPOSITORY=${GITHUB_REPOSITORY:? please provide a name of a repository} | |
OWNER=$(echo $GITHUB_REPOSITORY | cut -d/ -f1) |
This file contains hidden or 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 | |
# | |
# Compiles a Python package into a zip deployable on AWS Lambda | |
# | |
# - Builds Python dependencies into the package, using a Docker image to correctly build native extensions | |
# - Strip shared object files for smaller size ca. 20% reduction | |
# - Remove .py and use .pyc's = faster lambda and ca. 20% reduction | |
# - Remove tests, info (minor reduction, but why not) | |
# - Remove packages that will be available in AWS lambda env anyway (boto et al) ca. 50mb (uncompressed) reduction | |
# - Able to be used with the terraform-aws-lambda module |
This file contains hidden or 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
container: | |
image: debian:stretch-slim | |
options: "--name ci-container -v /usr/bin/docker:/tmp/docker:ro" | |
steps: | |
- script: | | |
/tmp/docker exec -t -u 0 ci-container \ | |
sh -c "apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" -y install sudo" | |
displayName: Set up sudo |
2017-03-03 fm4dd
The gcc compiler can optimize code by taking advantage of CPU specific features. Especially for ARM CPU's, this can have impact on application performance. ARM CPU's, even under the same architecture, could be implemented with different versions of floating point units (FPU). Utilizing full FPU potential improves performance of heavier operating systems such as full Linux distributions.
These flags can both be used to set the CPU type. Setting one or the other is sufficient.
This file contains hidden or 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
import fs from 'fs' | |
import path from 'path' | |
import config from '../constants/config.js' | |
const fs = require('fs') | |
const template_dir = path.resolve(__dirname, '../public') | |
const template_file = 'index.html' | |
const version = config.version.replace(/\./g, '') | |
fs.readFile(path.resolve(template_dir, template_file), 'utf8', (err, data) => { |
This file contains hidden or 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
[global] | |
veto files = /icon?/TheVolumeSettingsFolder/.DS_Store/.TemporaryItems/TheFindByContentFolder/.FBCindex/.FBCIndexCopy/.localized/Net | |
delete veto files = yes |
This file contains hidden or 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 | |
# ORIGIN: http://apple.stackexchange.com/a/231020 | |
(set -x; brew upgrade;) | |
(set -x; brew cleanup;) | |
(set -x; brew cask cleanup;) | |
(set -x; brew prune;) | |
(set -x; brew doctor;) | |
red=$(tput setaf 1) | |
green=$(tput setaf 2) |
NewerOlder