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
# crontab entry | |
0 0 1 * * /etc/ssl/acme/renew_certs.sh 2>&1 | tee -a /var/log/acme.log |
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
<% controller.send :byebug %> |
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
# config/initializers/doorkeeper.rb | |
Doorkeeper.configure do | |
resource_owner_authenticator do | |
# fail "Please configure doorkeeper resource_owner_authenticator block located in #{__FILE__}" | |
# Put your resource owner authentication logic here. | |
if signed_in? | |
current_user | |
else | |
# redirect to /oauth/authorize?... after signin | |
session[:user_return_to] = request.fullpath |
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 tic(n){t[n]=(new Date).getTime()}function toc(n){console.log(n+': '+((new Date).getTime()-t[n])+'ms')}t=[] |
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
GrapeTokenAuth.setup! do |config| | |
## The time span that GTA tokens are valid for | |
# config.token_lifespan = 2.weeks | |
## The timeframe in which a subsequent requests | |
## are considered "batch" requests | |
# config.batch_request_buffer_throttle = 5.seconds | |
## Whether new auth headers / tokens are created on each request | |
# config.change_headers_on_each_request = true |
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 | |
# don't do anything | |
DRYRUN=0 | |
# add trailing slash | |
BACKUPDIR="/backup/files/" | |
# generate final bzipped tarball, uses pbzip2 | |
TARBALL=/backup/backup.tar.bz2 |
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/sh | |
git checkout gh-pages | |
git merge master | |
rake rdoc | |
git add -f html | |
git commit -m "Generate RDoc for commit $(git rev-parse master)" | |
git push --no-verify | |
git checkout master |
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
[Desktop Entry] | |
Type=Application | |
Name=JavaFX Scene Builder | |
Comment=Visual layout tool that lets users quickly design Java application user interfaces | |
Icon=java | |
TryExec=scenebuilder | |
Exec=scenebuilder | |
Terminal=false |
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 ruby | |
# | |
# parse_ddrescue_log - show bad sectors and their sizes | |
# | |
require 'filesize' | |
unless ARGV.count == 1 | |
puts "Usage: #{__FILE__} MAPFILE" | |
exit 1 |
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
dconf key: /org/mate/settings-daemon/plugins/media-keys/volume-step |