Skip to content

Instantly share code, notes, and snippets.

@ryenus
ryenus / less-color.sh
Last active September 2, 2016 08:31 — forked from boredzo/colorman.zsh
Color Terminal for bash/zsh etc..
# put into ~/.bashrc, or whereever fit
export LESS_TERMCAP_md=$'\e[1;36m'
export LESS_TERMCAP_me=$'\e[0m'
export LESS_TERMCAP_se=$'\e[0m'
export LESS_TERMCAP_so=$'\e[1;41m'
export LESS_TERMCAP_ue=$'\e[0m'
export LESS_TERMCAP_us=$'\e[1;32m'
@ryenus
ryenus / git-suse
Last active January 14, 2016 03:46 — forked from orctom/git-suse
Install GIT Client on SuSE
# Install GIT Client on SuSE 11 SP3
# for latest git
zypper addrepo http://download.opensuse.org/repositories/devel:/tools:/scm/SLE_11_SP3/devel:tools:scm.repo
# for perl-Error
zypper addrepo http://download.opensuse.org/repositories/devel:/languages:/perl/SLE_11_SP3/devel:languages:perl.repo
# Install packages
zypper install git
@ryenus
ryenus / osx_uninstall_mysql_install_mariadb_homebrew.md
Created January 5, 2016 15:14 — forked from brandonsimpson/osx_uninstall_mysql_install_mariadb_homebrew.md
OSX How To: Uninstall native MySQL and install MariaDB via Homebrew

OSX How To: Uninstall native MySQL and install MariaDB via Homebrew

This is a short overview on how to completely remove any old mysql server installs in OSX and upgrade to MariaDB without conflicts. Things can get a bit weird when you have various old installs of MySQL server floating around, and utilizing homebrew to install and upgrade MariaDB as a drop in replacement for MySQL has worked well, especially if you're used to managing MySQL installs via yum in linux.

First: Backup Your Data!

Backup all of your current databases with mysqldump

This isn't a tutorial on backups, and there are many ways to do it. You should know how to backup your data anyway. For this example, we'll do a full backup of our InnoDB databases.

@ryenus
ryenus / .bashrc
Last active April 23, 2016 01:16
unlimited bash history
export PATH=$(brew --prefix coreutils)/libexec/gnubin:$PATH
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=-1
HISTFILESIZE=-1
#HISTFILE="${HOME}/.history/$(date -u +%Y/%m/%d.%H.%M.%S)_${HOSTNAME_SHORT}_$$"
HISTFILE="${HOME}/.history/$(date -d 'last sat +1 day' +%Y/%V/%m.%d)_${HOSTNAME%%.*}"
@ryenus
ryenus / hn_mod.js
Last active August 29, 2015 14:26
HN Mod
// ==UserScript==
// @name HN Mod
// @namespace http://gitub.com/ryenus
// @version 0.1
// @description A nonintrusive Hacker News mod
// @author ryenus
// @match https://news.ycombinator.com/*
// @grant none
// ==/UserScript==
@ryenus
ryenus / cygup.bat
Last active November 17, 2018 03:03
cygup
REM cygup
@echo off
pushd "%~dp0"
set PATH="%~dp0;%dp0/bin"
@wget -N -nv --no-cache http://cygwin.com/setup-x86.exe
@start "Cygwin setup" /b setup-x86.exe -n -M -A >NUL 2>&1
@ryenus
ryenus / ExecutorCompletionServiceEx.java
Created November 27, 2014 03:05
ExecutorCompletionService Mod w/o need for tracking number of submitted tasks
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Callable;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorCompletionService;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
public class ExecutorCompletionServiceEx<V> extends ExecutorCompletionService<V> {
@ryenus
ryenus / repo-gen
Created November 25, 2014 14:43
Ubuntu Sources List Generator
### Ubuntu Sources List Generator
http://repogen.simplylinux.ch/index.php
@ryenus
ryenus / .inputrc
Created July 7, 2014 13:18
~/.inputrc
set mark-symlinked-directories on
set show-all-if-ambiguous on
@ryenus
ryenus / fixclock.sh
Created June 16, 2014 22:49
synchronize system clock
#!/bin/sh
fixclock() {
ntpdate pool.ntp.org && hwclock --systohc && hwclock --adjust
}