Skip to content

Instantly share code, notes, and snippets.

View fuzzmz's full-sized avatar

Serban Constantin fuzzmz

View GitHub Profile
@bimlas
bimlas / git-fetch-log
Last active March 28, 2016 09:34
Ultimate git fetch-log, pull-log, push-log, etc.
#!/bin/sh
# git-fetch-log: Ultimate git fetch-log
#
# It shows the diferences of `local...remote` if both side exists and there
# are differences. Useful to find out what you have to do: `merge`, `rebase`,
# `push`, etc. The arguments passed to log.
#
# Place it somewhere on Your `$PATH` and execute by the `git fetch-log`
# command.
#
@blockloop
blockloop / upgrade-ghost-openshift.sh
Created January 11, 2015 03:22
Upgrade your openshift ghost blog to the latest version
#!/usr/bin/env bash
if [ ! -f package.json ]; then
echo "This script must be run from the ghost blog directory"
exit 1
fi
ZIP_URL=https://ghost.org/zip/ghost-latest.zip
PROJ_DIR=$(pwd)
TMP_DIR=$(mktemp -d -t ghost)
require 'rubygems'
require 'mechanize'
FIRST_NAME = 'FIRST_NAME'
LAST_NAME = 'LAST_NAME'
PHONE = 'PHONE'
EMAIL = 'EMAIL@provider.com'
PARTY_SIZE = 2
SCHEDULE_RANGE = { :start_time => '19:00', :end_time => '20:30' }
@fuzzmz
fuzzmz / email.sh
Created March 30, 2013 22:55
Script to send email on Debian based server at shutdown and restart.
#!/bin/sh
### BEGIN INIT INFO
# Provides: SystemEmail
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Send email
# Description: Sends an email at system start and shutdown
### END INIT INFO
@fuzzmz
fuzzmz / gist:4111521
Created November 19, 2012 16:11
git revert to specific commit
git reset 56e05fced #resets index to former commit; replace '56e05fced' with your commit code
git reset --soft HEAD@{1} #moves pointer back to previous HEAD
git commit -m "Revert to 56e05fced"
git reset --hard #updates working copy to reflect the new commit
@klange
klange / _.md
Last active December 2, 2023 20:36
It's a résumé, as a readable and compilable C source file. Since Hacker News got here, this has been updated to be most of my actual résumé. This isn't a serious document, just a concept to annoy people who talk about recruiting and the formats they accept résumés in. It's also relatively representative of my coding style.

Since this is on Hacker News and reddit...

  • No, I don't distribute my résumé like this. A friend of mine made a joke about me being the kind of person who would do this, so I did (the link on that page was added later). My actual résumé is a good bit crazier.
  • I apologize for the use of _t in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I am the system libraries".
  • Since people kept complaining, I've fixed the assignments of string literals to non-const char *s.
  • My use of type * name, however, is entirely intentional.
  • If you're using an older compiler, you might have trouble with the anonymous unions and the designated initializers - I think gcc 4.4 requires some extra braces to get them working together. Anything reasonably recent should work fine. Clang and gcc (newer than 4.4, at le

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@aemkei
aemkei / LICENSE.txt
Last active April 12, 2024 21:27 — forked from 140bytes/LICENSE.txt
Binary Tetris - 140byt.es
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE