Skip to content

Instantly share code, notes, and snippets.

View iamtew's full-sized avatar
🤯
My status? I just found the User Status function!

Mikael 'tew' iamtew

🤯
My status? I just found the User Status function!
View GitHub Profile
#! /bin/bash
# Simple function to keep in your bashrc to lookup dependencies of a package
# in RHEL/CentOS/Fedora or other similair distributions.
#
# Based on commands from this email thread:
# http://lists.centos.org/pipermail/centos/2006-May/022778.html
yum-pkg-depends ()
{
PACKAGE_NAME=$1
@iamtew
iamtew / build-rpm
Created April 17, 2014 14:37
Simple script to build rpm package with FPM
#! /bin/bash
#
# Simple script to build rpm package with FPM
#
# How to use:
# 1. Create package directory to hold all files, like: ~/src/<package>
# 2. Copy this script, build-rpm, to package directory
# 3. Create subdirectory for the buildroot, like: ~/src/<package>/buildroot
# 4. The buildroot directory will act as a chroot, place files and
# and directories in their appropriate target locations

Keybase proof

I hereby claim:

  • I am iamtew on github.
  • I am iamtew (https://keybase.io/iamtew) on keybase.
  • I have a public key whose fingerprint is 6F85 DF1A 6627 9604 EC6D 17E7 8993 5726 6741 0E7D

To claim this, I am signing this object:

@iamtew
iamtew / md2docx.sh
Created August 21, 2014 19:38
Markdown 2 DOCX using Pandoc
#! /usr/bin/env bash
# For some reason not everyone in the office enjoys markdown documents, so here's
# a quick Pandoc converter function to stick in your ~/.bashrc
md2docx ()
{
INPUT=$1
if [[ $INPUT ]]
then
#! /usr/bin/env bash
#
# willie_monit.sh
#
# Crontab script to ensure Willie bot is running :-)
#
# Willi configuration file and PID file
willie_cfg="$HOME/.willie/default.cfg"
willie_pid="$HOME/.willie/willie-default.pid"
@iamtew
iamtew / st3-dropbox.sh
Created October 9, 2014 07:31
Sublime Text 3 in DropBox, same config on every box you have!
# Sublime Text 3 in DropBox, same config on every box you have!
# From here:
# http://www.alexconrad.org/2013/07/sync-sublime-text-3-settings-with.html
# Create the sync directory in Dropbox
$ mkdir ~/Dropbox/sublime-text-3/
# Move your ST3 "Packages" and "Installed Packages" to Dropbox
$ cd ~/.config/sublime-text-3/
$ mv Packages/ ~/Dropbox/sublime-text-3/
@iamtew
iamtew / saltstack-notes.md
Last active August 29, 2015 14:07
Notes on SaltStack

Random notes on SaltStack

Some random notes on Saltstack and tools around it

Upgrade the master:

# for X in /etc/init.d/salt-* ; do echo $X ; /sbin/service $(basename $X) stop; rm -vf $X ; done
# for X in /usr/lib/systemd/system/salt-*.service ; do echo $X ; systemctl stop $(basename $X) ; rm -fv $X ; done
# sh install_salt.sh -M -X -P git v2014.7.0rc5 
@iamtew
iamtew / mk_simple_repo.sh
Last active August 29, 2015 14:08
Dead simple Debian repository generator for simple package hosting
#! /usr/bin/env bash
# mk_simple_repo.sh - Simple Debian repository generator
#
# Prerequisites:
# Packages:
# dpkg-dev
# VirtualHost:
# <Directory /var/www/repos/ >
# Options Indexes FollowSymLinks Multiviews
# Order allow,deny
@iamtew
iamtew / Building_a_ShrimpKey.md
Last active August 29, 2015 14:14
Building a ShrimpKey

ShrimpKey BOM

Got it? Component Amount Tayda part number
ATMEGA328P-PU 1x A-854
✔️ 22pF condensator 2x A-523
✔️ 100nF condensator 4x A-4008
10uF condensator 1x A-4534
✔️ 10kOhm resistor 1x A-2115
✔️ 1N4149 diode 1x [A-157](http://www
/* style.css
* Some basic styling to make naked HTML look a bit nicer.
* Related links:
* - http://codepen.io/dredmorbius/pen/KpMqqB?editors=110
* - http://bettermotherfuckingwebsite.com/
* - http://motherfuckingwebsite.com/
*/
a {
color: #1e6b8c;