Skip to content

Instantly share code, notes, and snippets.

View rickumali's full-sized avatar

Rick Umali rickumali

View GitHub Profile
@matijs
matijs / README.md
Last active February 22, 2024 05:35
Solarized Dark profile for macOS Terminal.app

Solarized Dark profile for Terminal.app on macOS High Sierra

Based on the excellent Solarized (Dark) created by Ethan Schoonover. For source code, check the main Solarized repository on GitHub.

Installation

Open and save Solarized Dark.terminal.

Import from the “Profiles” tab in the settings of Terminal.app or just double-click the file after downloading.

@sobstel
sobstel / nokogiri_install
Created January 3, 2017 17:30
nokogiri -> ERROR: cannot discover where libxml2 is located on your system
# `ERROR: Error installing nokogiri:
# ERROR: Failed to build gem native extension.
#
# current directory: /usr/local/var/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/nokogiri-1.7.0/ext/nokogiri
# /usr/local/var/rbenv/versions/2.3.1/bin/ruby -r ./siteconf20170103-68488-r71c9j.rb extconf.rb --with-xml=/usr/local/Cellar/libxml2/ --use-system-libraries
# checking if the C compiler accepts ... yes
# checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no
# Building nokogiri using system libraries.
# ERROR: cannot discover where libxml2 is located on your system. please make sure `pkg-config` is installed.
# *** extconf.rb failed ***
@nikic
nikic / php_evaluation_order.md
Last active October 19, 2021 05:47
Analysis of some weird evaluation order in PHP

Order of evaluation in PHP

Yesterday I found some people on my [favorite reddit][lolphp] wonder about the output of the following code:

<?php

$a = 1;
$c = $a + $a++;
@xeoncross
xeoncross / password_reset.php
Last active June 12, 2019 01:17
Vanilla Forums CLI Password Reset Script
<?php PHP_SAPI == 'cli' OR die('CLI use only');
// We need a username here folks
if(empty($argv[1]))
{
die('Usage: $ php ' . basename(__FILE__) . " [username] [password]\n");
}
define('APPLICATION', 'Vanilla');
@larsks
larsks / blogger2scriptogram.py
Created November 6, 2012 04:23
Convert Blogger posts to Markdown for use with Scriptogr.am
#!/usr/bin/python
import os
import sys
import argparse
import iso8601
import re
import subprocess
import logging
import json
@andyscott
andyscott / blah.sh
Created May 26, 2011 14:31
WIP script for determining which repos are ahead/behind origin
#!/bin/sh
dg="\e[0;32m"
r="\e[1;31m"
b="\e[1;34m"
m="\e[1;35m"
cyan="\e[1;36m"
rs="\e[0m"
pdir=${PWD##*/}
@oyvholm
oyvholm / README
Created May 30, 2010 13:27
Workaround for storing empty directories in Git
This is a workaround for storing empty directories in Git.
People have suggested things like storing empty .gitignore files in every empty
directory, but sometimes this is not something we want to do. Instead, use
git-store-dirs to create a file named ".emptydirs" at the top of the working
tree that contains a null-separated list of all empty directories, and use
git-restore-dirs to get them all back.