Skip to content

Instantly share code, notes, and snippets.

View thcipriani's full-sized avatar

Tyler Cipriani thcipriani

View GitHub Profile
@thcipriani
thcipriani / ices-config.xml
Created February 10, 2012 22:06
ices-config.xml
<?xml version="1.0"?>
<ices>
<!-- run in background -->
<background>1</background>
<!-- where logs, etc go. -->
<logpath>/path/to/error/log</logpath>
<logfile>ices.log</logfile>
<!-- 1=error,2=warn,3=info,4=debug -->
<loglevel>4</loglevel>
<!-- set this to 1 to log to the console instead of to the file above -->

Cloning All Gerrit Repos

I'm doing this with the myrepos perl script. I started down the path of reimplementing a good chunk of functionality of myrepos before realizing my mistake and generating a config file instead :)

To generate the config file I used this beauty:

while read repo; do
    printf '[%s]\n%s\n\n' "${repo}.git" "checkout = git clone --mirror https://gerrit-replica.wikimedia.org/r/${repo}"

done < <(curl -sL https://gerrit.wikimedia.org/r/projects/?all | \

#!/usr/bin/env bash
# journal.sh
# ==========
#
# One daily text file to rule them all.
#
# Copyright: 2022 Tyler Cipriani <tyler@tylercipriani.com
# License: GPLv3
set -euo pipefail
@thcipriani
thcipriani / baller_motd.md
Last active February 12, 2023 12:28
Using img2ponysay to create baller /etc/motd message

Update: I made this a proper blog post

Creating Baller/Useful MOTD Messages

Zangief MOTD

Prerequisites

  • linux box
@thcipriani
thcipriani / archive-org-m3u.py
Created March 28, 2016 18:20
Create m3u files from Archive.org search results
#!/usr/bin/env python2
# coding: utf-8
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@thcipriani
thcipriani / Coffee Experiment.md
Last active September 18, 2022 07:31
Analysis of Extraction Yield for Coffee Brewing Methods
(/^ヮ^)/*:・゚✧ grep -aP '\bman\b' ~/.muh_history | awk '{print $(NF)}' | sort | uniq -c | sort -rn | head -20
54 date
53 ssh
50 bash
37 curl
35 sudo
34 man
32 ssh-keygen
32 rsync
31 ascii
@thcipriani
thcipriani / index.html
Created May 2, 2014 15:49
Ansi → HTML
<HEAD>
<TITLE></TITLE>
<STYLE>
PRE{LINE-HEIGHT:1.3;FONT-FAMILTY:MONACO,'COURIER NEW';}
</STYLE>
</HEAD>
<BODY BGCOLOR=BLACK>
&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
<CENTER>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.082352941176470587</real>
<key>Green Component</key>
<real>0.082352941176470587</real>
@thcipriani
thcipriani / umask.py
Created March 15, 2016 16:06
Dumb umask calculator
"""
umask.py - a dumb script that demonstrates how umask(2) works
"""
def umask(default, mask):
"""A umask is the bitwise conjunction of default permissions
<default> and the bitwise negation of file-creation mode mask <mask>"""
new = []
for d, m in zip(default, mask):
new.append(str(int(d) & ~int(m)))