Skip to content

Instantly share code, notes, and snippets.

View scottjbarr's full-sized avatar

Scott Barr scottjbarr

View GitHub Profile
@scottjbarr
scottjbarr / install_python26_from_source.sh
Created January 21, 2010 01:53
Install Python 2.6 from Source
#!/bin/bash
#
# Install Python 2.6 from Source
#
# Author : Scott Barr
# Date : 21 Jan 2010
#
PYTHON_VERSION=2.6.4
#!/bin/bash
#
# Install common Go tools.
#
# Author : Scott Barr
# Date. : 12 Dec 2023
#
go install golang.org/x/tools/cmd/goimports@latest
go install golang.org/x/tools/gopls@latest
@scottjbarr
scottjbarr / gnome-customization.sh
Last active May 23, 2023 00:11
Shell script to set up Gnome config.
#!/bin/bash
#
# Collection of custom Gnome settings.
#
# Author : Scott Barr
# Date : 9 Jul 2018
#
# alt-tab only cycles current workspace
gsettings set org.gnome.shell.app-switcher current-workspace-only true
@scottjbarr
scottjbarr / memcached.conf
Created December 14, 2009 06:01
memcached default config file
# memcached default config file
# 2003 - Jay Bonci <jaybonci@debian.org>
# This configuration file is read by the start-memcached script provided as
# part of the Debian GNU/Linux distribution.
# Run memcached as a daemon. This command is implied, and is not needed for the
# daemon to run. See the README.Debian that comes with this package for more
# information.
-d
@scottjbarr
scottjbarr / Makefile
Created March 19, 2023 13:02 — forked from ryu1kn/Makefile
Encrypt/decrypt with AWS KMS using AWS cli
# How to encrypt/decrypt your text/blob secret with AWS KMS with AWS cli
KEY_ID=alias/my-key
SECRET_BLOB_PATH=fileb://my-secret-blob
SECRET_TEXT="my secret text"
ENCRYPTED_SECRET_AS_BLOB=encrypted_secret_blob
DECRYPTED_SECRET_AS_BLOB=decrypted_secret_blob # Result of decrypt-blob target
encrypt-text:
@scottjbarr
scottjbarr / .goconfig
Last active June 12, 2021 14:52
Install a particular version of Go, and a .goconfig to setup your shell
# source this file from your .bash_profile
export GOROOT=~/.go/versions/go1.10.3
export GOPATH=~/p/go
export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
@scottjbarr
scottjbarr / journalctl.md
Created January 9, 2021 23:32 — forked from tyagiakhilesh/journalctl.md
Using JournalCtl to view system logs
// To display utc timestamp in logs
journalctl --utc

// Displaying Logs from the Current Boot
journalctl -b

// Listing boots
journalctl --list-boots
@scottjbarr
scottjbarr / emacs-cheatsheet.md
Last active March 17, 2020 04:33
Emacs Cheatsheet

Emacs Cheatsheet

C : Control key

M : Meta key

General

C-g - Exit command

@scottjbarr
scottjbarr / install_memcached.sh
Created December 14, 2009 07:26
Install memcached and libevent from source on Debian Etch or Lenny
#!/bin/bash
#
# Download and install libevent and memcached from source on Debian Etch or
# Debian Lenny.
#
# Assumptions
# - libevent and memcached have not been installed from apt repositories
# - memcached is not already running
# - it is ok to clobber scripts at
# /etc/memcached.conf
@scottjbarr
scottjbarr / nginx_vhost.conf
Last active December 18, 2019 00:25
Nginx - redirects php, asp, cgi (etc) to Recursive David Hasselhoff
server {
listen *:80;
root /u/apps/...;
passenger_enabled on;
passenger_ruby /usr/local/rvm/gems/ruby-2.2.0/wrappers/ruby;
rails_env staging;
client_max_body_size 20M;