Skip to content

Instantly share code, notes, and snippets.

@andromedarabbit
andromedarabbit / chmodr.sh
Created October 17, 2012 06:16 — forked from francisbyrne/chmodr.sh
Recursive chmod script for dirs and/or files
#!/bin/sh
#
# chmodr.sh
#
# author: Francis Byrne
# date: 2011/02/12
#
# Generic Script for recursively setting permissions for directories and files
# to defined or default permissions using chmod.
#
@andromedarabbit
andromedarabbit / 0_reuse_code.js
Last active August 29, 2015 14:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Description

When using Homebrew (http://brew.sh) and searching formulas or pull requests you may get the dreaded error message: Github API Rate limit exceeded

Let's fix that! (yeah!)


Short version

Create a new Personal Token in your Github Account Settings (Sidebar: Applications) and then copy the Token. In the Terminal, use export HOMEBREW_GITHUB_API_TOKEN=YOURAPITOKENWITHFUNKYNUMBERSHERE (change that to your API Token) or add that to your .bash_profile and then do source .bash_profile.

@andromedarabbit
andromedarabbit / install_gradle
Last active August 29, 2015 14:27 — forked from JMBattista/install_gradle
Upgrade Gradle Codeship
#!/bin/bash
# Allows using Gradle 2.6 with http://codeship.io
GRADLE=gradle-2.6-bin
GRADLE_URL="https://services.gradle.org/distributions/$GRADLE.zip"
wget -N $GRADLE_URL
mkdir -p ~/gradle
unzip $GRADLE.zip -d ~
@andromedarabbit
andromedarabbit / build.gradle
Last active September 21, 2015 12:56 — forked from grafjo/build.gradle
Example gradle build to upload a Spring Boot based jar to nexus
group = "foo"
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.1.8.RELEASE")
}
}
@andromedarabbit
andromedarabbit / gist:875e26c8d89852532527
Created March 9, 2016 13:04 — forked from samnang/gist:1759336
Install Bash version 4 on MacOS X
# Install Bash 4 using homebrew
brew install bash
# Or build it from source...
curl -O http://ftp.gnu.org/gnu/bash/bash-4.2.tar.gz
tar xzf bash-4.2.tar.gz
cd bash-4.2
./configure --prefix=/usr/local/bin && make && sudo make install
# Add the new shell to the list of legit shells

Image source

https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

Try resize it!

  • ![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png | width=100)
@andromedarabbit
andromedarabbit / BooleanTypeHandler.java
Last active June 15, 2016 03:02 — forked from inancsevinc/BooleanTypeHandler.java
BooleanTypeHandler for MyBatis
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.MappedJdbcTypes;
import org.apache.ibatis.type.MappedTypes;
@andromedarabbit
andromedarabbit / check_docker_container.sh
Created October 31, 2016 07:05 — forked from ekristen/check_docker_container.sh
Bash Script for Nagios to Check Status of Docker Container
#!/bin/bash
# Author: Erik Kristensen
# Email: [email protected]
# License: MIT
# Nagios Usage: check_nrpe!check_docker_container!_container_id_
# Usage: ./check_docker_container.sh _container_id_
#
# The script checks if a container is running.
# OK - running