Skip to content

Instantly share code, notes, and snippets.

View jasonehines's full-sized avatar

Jason Hines jasonehines

View GitHub Profile
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@jasonehines
jasonehines / find between dates.sh
Last active March 5, 2016 22:02
find file in current directory between two dates
find . -newermt "2016-03-02 11:00:00" ! -newermt "2016-03-02 11:45:00"
@jasonehines
jasonehines / re
Created April 3, 2016 17:57
Find and rename file
# find file in current directory and rename some_file_name to end in .old
find . -iname *some_file_name* -exec mv {} {}.old \;
# find file in directory starting with rc and rename to end in .old
find .rc* -iname *some_file_name* -exec mv {} {}.old \;
GNU nano 2.5.3 File: /usr/local/bin/greeting.py
#!/usr/bin/python
from websocket import create_connection
ws = create_connection("ws://localhost:8000/events/ws")
ws.send('{"message_type": "speak", "context": null, "metadata": {"utterance": "Welcome back Jason"}}')
result = ws.recv()
ws.close()
#how to install tinc
sudo eopkg install -c system.devel
sudo eopkg install lzo-devel git
mkdir Source
cd Source
git clone https://github.com/gsliepen/tinc.git
cd tinc
autoreconf --install
./configure
sudo make install
@jasonehines
jasonehines / remove_duplicate_lines.sh
Created June 3, 2019 20:12
Remove duplicate lines preserving order #awk #shell
# https://iridakos.com/how-to/2019/05/16/remove-duplicate-lines-preserving-order-linux.html
awk '!visited[$0]++' your_file > deduplicated_file
@jasonehines
jasonehines / .s3cfg
Last active March 9, 2020 20:46
Digital Ocean Spaces s3cmd configuration example
[default]
access_key = #replace with your DO key
access_token =
add_encoding_exts =
add_headers =
bucket_location = nyc3
ca_certs_file =
cache_file =
check_ssl_certificate = True
check_ssl_hostname = True

Keybase proof

I hereby claim:

  • I am jasonehines on github.
  • I am jasonehines (https://keybase.io/jasonehines) on keybase.
  • I have a public key ASD2DEa8O4N4WduhBxs2-UpZzhXsXBDf0POtveHltgAspwo

To claim this, I am signing this object:

@jasonehines
jasonehines / DO_s3fs_example.txt
Last active November 28, 2022 08:21
Digital Ocean Spaces s3fs example
s3fs hinesnetwork /mnt/hinesnetwork.nyc3.digitaloceanspaces.com -o passwd_file=/etc/passwd-s3fs -o url=https://nyc3.digitaloceanspaces.com -o endpoint=nyc3 -d -d -f -o f2 -o curldbg

Solus packaging cheat sheet

Setup

Install required packages

  • sudo eopkg install -c system.devel
  • sudo eopkg install git solbuild
  • sudo eopkg install solbuild-config-unstable

Create repository directory

  • mkdir ~/repository