#Here is how I keep my secrets out of my source code when working with OpenShift
-
find your app's ssh address:
rhc app show YOUR_APP_NAME
-
ssh into your gear to set your environment variables:
ssh YOUR_APPS_SSH_URL
#Here is how I keep my secrets out of my source code when working with OpenShift
find your app's ssh address:
rhc app show YOUR_APP_NAME
ssh into your gear to set your environment variables:
ssh YOUR_APPS_SSH_URL
# Turn DD-WRT wireless radio on for business hours only. Verify wireless interface for your router model. | |
# Place in WebUI > Administration > Management > Cron | |
0 18 * * 1,2,3,4,5 root wl -i eth1 radio off | |
0 6 * * 1,2,3,4,5 root wl -i eth1 radio on |
#!/bin/bash | |
# | |
# Copy data from a Time Machine volume mounted on a Linux box. | |
# | |
# Usage: copy-from-time-machine.sh <source> <target> | |
# | |
# source: the source directory inside a time machine backup | |
# target: the target directory in which to copy the reconstructed | |
# directory trees. Created if it does not exists. | |
# |
require 'sinatra' | |
require 'haml' | |
$users = {'john' => {:roles => [:user] }, 'mike' => {:roles => [:user, :admin] } } | |
$tokens = {'123' => {:username => 'john', :expires_at => Time.now+60}} | |
helpers do | |
def authenticate_user! | |
@auth_token = auth_token | |
if $tokens.has_key?(@auth_token) && !$tokens[@auth_token][:expires_at].nil? && $tokens[@auth_token][:expires_at] > Time.now |
<div class="container"> | |
<div class="row"> | |
<div class="col-sm-6 col-md-4 col-md-offset-4"> | |
<h1 class="text-center login-title">Sign in to continue to Bootsnipp</h1> | |
<div class="account-wall"> | |
<img class="profile-img" src="https://lh5.googleusercontent.com/-b0-k99FZlyE/AAAAAAAAAAI/AAAAAAAAAAA/eu7opA4byxI/photo.jpg?sz=120" | |
alt=""> | |
<form class="form-signin"> | |
<input type="text" class="form-control" placeholder="Email" required autofocus> | |
<input type="password" class="form-control" placeholder="Password" required> |
These two files should help you to import passwords from mac OS X keychains to 1password. | |
Assumptions: | |
1) You have some experience with scripting/are a power-user. These scripts worked for me | |
but they haven't been extensively tested and if they don't work, you're on your own! | |
Please read this whole document before starting this process. If any of it seems | |
incomprehensible/frightening/over your head please do not use these scripts. You will | |
probably do something Very Bad and I wouldn't want that. | |
2) You have ruby 1.9.2 installed on your machine. This comes as standard with Lion, previous | |
versions of OS X may have earlier versions of ruby, which *may* work, but then again, they |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
# use this if you have a systemctl --user script. Runs it as a user. | |
[Unit] | |
Description=Keeps a tunnel to 'remote.example.com' open | |
After=network.target | |
[Service] | |
# -p [PORT] | |
# -l [user] | |
# -M 0 --> no monitoring |
#!/bin/bash | |
task(){ | |
LC_ALL=C nc -vzw5 portquiz.net $1 2>&1 | grep -v 'Connection timed out' | |
} | |
N=50 # Specify number of ports to check at once | |
( | |
for port in {1..65535}; do # Specify port range to check here | |
((i=i%N)); ((i++==0)) && wait |
# Tested Environment | |
# Windows7 x64, MS Access2010/2013, sequel 4.11.0 | |
# Gemfile | |
# source 'https://rubygems.org' | |
# gem 'sequel' | |
# gem 'ruby-odbc' # for ODBC | |
require 'sequel' |