Skip to content

Instantly share code, notes, and snippets.

View BenRoe's full-sized avatar
👨‍💻
coding...

Ben BenRoe

👨‍💻
coding...
View GitHub Profile
#!/bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
IFS=$'\n\t'
# inspired by
# https://gist.github.com/codeinthehole/26b37efa67041e1307db
# https://github.com/why-jay/osx-init/blob/master/install.sh
# https://github.com/timsutton/osx-vm-templates/blob/master/scripts/xcode-cli-tools.sh
@qoomon
qoomon / conventional_commit_messages.md
Last active April 25, 2024 19:35
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@jaredatch
jaredatch / mailhog-mamp.md
Created January 30, 2018 21:57
Install MailHog with MAMP Pro

Install MailHog with MAMP Pro, using HomeBrew.

MailHog

First let's make sure HB is updated. Open up terminal for the following steps.

$ brew update
@jagrosh
jagrosh / Growing A Discord Server.md
Last active February 17, 2024 04:29
Tips for creating and growing a new Discord server

This guide is kept up-to-date as Discord and available resources change!
A basic server template is available here

Creating and Growing a Discord Server

logo

Introduction

Hello! I'm jagrosh#4824! I'm writing this guide to try to help new server owners set up and grow their servers, which is a commonly-requested topic. It's very easy to go about this the wrong way, so it's best to be prepared and make smart decisions so that your community can flourish!

Background

@0xjac
0xjac / private_fork.md
Last active April 25, 2024 14:16
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@adricasti
adricasti / Readme.md
Last active June 24, 2020 18:59
nRF52 Toolchain Setup in Mac OS X

Equipment

  • MacOS Mojave 10.14.4
  • MacBook Pro (Retina, 13-inch, Late 2012)
  • nRF52-DK (PCA10040)

Toolchain Setup

  1. Install GCC
@bosskovic
bosskovic / I18n_test.php
Last active March 14, 2023 02:13
Example of PHP file translated using gettext
<?php
session_start();
if (isset($_GET["locale"])) {
$locale = $_GET["locale"];
}
else if (isset($_SESSION["locale"])) {
$locale = $_SESSION["locale"];
}
else {
@nilshendriks
nilshendriks / gist:3080521
Created July 10, 2012 02:03
Language quote characters
blockquote, q {
quotes: none;
}
q:before, blockquote:before {
content: open-quote;
}
blockquote:before {
margin-left: -0.5em;
}
q:after, blockquote:after {
@davidalexander
davidalexander / gist:1086455
Last active September 7, 2023 07:42
Magento Snippets

Magento Snippets

Download extension manually using pear/mage

Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/

./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent

Clear cache/reindex

// Kosso imageAsCropped
// added to TiBlob.m
// requires 4 arguments : x, y, width, height
- (id)imageAsCropped:(id)args
{
[self ensureImageLoaded];
if (image!=nil)
{
ENSURE_ARG_COUNT(args,4);