Skip to content

Instantly share code, notes, and snippets.

View Qtrain's full-sized avatar

Michael Queue Qtrain

  • Linode
  • Philadelphia, Pa
View GitHub Profile
<!-- column 0 -->
<footer>
<img src="https://www.linode.com/wp-content/uploads//2018/10/linode-logo-blk-rgb-minified.svg">
<!-- column 1 -->
<nav>
<h5>Why Linode</h5>
<ul>
<li><a href="https://www.linode.com/choosing-linode/"><span class="title">Choosing Linode</span></a></li>
<li><a href="https://www.linode.com/support-experience/"><span class="title">Support Experience</span></a></li>
<li><a href="https://www.linode.com/predictable-pricing/"><span class="title">Predictable Pricing</span></a></li>
# get current branch in git repo
function parse_git_branch() {
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ ! "${BRANCH}" == "" ]
then
STAT=`parse_git_dirty`
echo "[${BRANCH}${STAT}]"
else
echo ""
fi

Keybase proof

I hereby claim:

  • I am qtrain on github.
  • I am qtrain (https://keybase.io/qtrain) on keybase.
  • I have a public key ASAXfwRatyTgk6owL0HGFN5iXkATjLWX3oGwiujIK6xK3Ao

To claim this, I am signing this object:

import linode_api4
client = linode_api4.LinodeClient('insert client secret')
def get_user_input():
# need input function for service type
# size = input("what service type")
service_id = linode_api4.Type(client, 'g5-standard-1')
#paramatarize
Ingredients:
1.5 lbs of ground sirloin (kind of hard to find and the meat definitely makes a difference.. But, I've used 80% and they turned out well. I usually ask the butcher and I think that Shoprite has ground sirloin.)
1 tsp basil
1/2 tsp oregano
2 tsp onion powder
2 tsp onion salt
generous (and I do mean generous) amt of parsley
3 heaaapppiinnngg tbsp of cheese
2 eggs
1 piece of white bread (soak in cereal bowl of water)
@Qtrain
Qtrain / clone all ya gists
Last active December 1, 2017 03:55
clone all of your gists
grab a php shell with php -a
$gists = json_decode(`curl -f -s https://api.github.com/users/qtrain/gists`);
foreach($gists as $gist){
exec("git clone $gist->git_pull_url");
}
echo "done!";
@Qtrain
Qtrain / users
Created November 30, 2017 20:29
awk -F: '($3>=1000) && ($3!=65534)' /etc/passwd > passwd.new
awk -F: '($3>=1000) && ($3!=65534) {print $1}' /etc/passwd | grep -f - /etc/shadow > shadow.new
awk -F: '($3>=1000) && ($3!=65534)' /etc/group > group.new
cat passwd.new >> /etc/passwd
cat group.new >> /etc/group
cat shadow.new >> /etc/shadow
@Qtrain
Qtrain / tmux-cheatsheet.markdown
Created September 2, 2017 17:31 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
sudo -i
service mysql stop
killall -KILL mysql mysqld_safe mysqld
apt-get --yes purge mysql-server mysql-client
apt-get --yes autoremove --purge
apt-get autoclean
deluser --remove-home mysql
delgroup mysql
rm -rf /etc/apparmor.d/abstractions/mysql /etc/apparmor.d/cache/usr.sbin.mysqld /etc/mysql /var/lib/mysql /var/log/mysql* /var/log/upstart/mysql.log* /var/run/mysqld
updatedb
### Keybase proof
I hereby claim:
* I am qtrain on github.
* I am mikeqlinode (https://keybase.io/mikeqlinode) on keybase.
* I have a public key ASByd1OETHWx85Vm6Okdh6nJhAlF_qtbKefgbxlEz6ECJwo
To claim this, I am signing this object: