Skip to content

Instantly share code, notes, and snippets.

Writing code one line at a time

Ben othyn

Writing code one line at a time
Block or report user

Report or block othyn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
robmadole /
Created Sep 7, 2017
Font Awesome 5 JS API reference

Font Awesome 5

FontAwesome.js - ES6, CommonJS, and AMD module

"I came here to chew bubblegum and install Font Awesome 5 - and I'm all out of bubblegum"

npm linking

While we are in are Beta period we won't be publishing packages to

Instead we are going to recommend linking.

barbietunnie /
Last active Oct 23, 2019
MySQL Database User GRANT permissions for Laravel

MySQL Database User GRANT permissions for Laravel

For security reasons, you should probably grant select, delete, update and insert to your app user in production.

Have another user who can do alter, create, drop and index when running migrations.

If you run seeders in production, also grant select, insert and references to the migration user.

Yeah, 2 users, migrations are not always run in production everyday and this keeps more secure your database.

View PluginTranslucentTaskbar.cpp
#include <Windows.h>
#include "../../API/RainmeterAPI.h"
int nAccentState;
int nFlags;
int nColor;
int nAnimationId;
View translucenttb.cpp
#include <windows.h>
void SetWindowBlur(HWND hWnd)
const HINSTANCE hModule = LoadLibrary(TEXT("user32.dll"));
if (hModule)
#!/usr/bin/env python
import os
import math
from numpy import interp
from random import choice, sample
from time import sleep
from math import log1p
# from colour import Color
maxogden /
Created Nov 24, 2016
4k timelapse ffmpeg
ffmpeg -r 25 -pattern_type glob -i '*.jpg' -vf scale=3840:-1 -vcodec libx264 -crf 25 OUTPUT.MP4

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.

Effective Engineer - Notes

What's an Effective Engineer?

jacurtis / _spacing-helpers.scss
Last active Nov 7, 2019
SASS Margin and Padding Helpers Loop. Generates .m-t-10 type helper classes.
View _spacing-helpers.scss
This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects.
It will generate several classes such as:
.m-r-10 which gives margin-right 10 pixels.
.m-r-15 gives MARGIN to the RIGHT 15 pixels.
.m-t-15 gives MARGIN to the TOP 15 pixels and so on.
.p-b-5 gives PADDING to the BOTTOM of 5 pixels
.p-l-40 gives PADDING to the LEFT of 40 pixels
othyn /
Last active Nov 2, 2019
How to setup a Factorio Headless Server

[LINUX] Factorio Headless Server Guide

So, with credit to the Factorio wiki and cbednarski's helpful gist, I managed to eventually setup a Factorio headless server. Although, I thought the process could be nailed down/simplified to be a bit more 'tutorialised' and also to document how I got it all working for my future records.

The specific distro/version I'm using for this guide being Ubuntu Server 16.04.1 LTS. Although, that shouldn't matter, as long as your distro supports systemd (just for this guide, not a Factorio headless requirement, although most distros use it as standard now). The version of Factorio I shall be using is 0.14.20, although should work for any version of Factorio 0.14.12 and higher.


If you prefer a simple, automated setup, [Bisa has a really handy init script that will do most of the work for

slavafomin /
Last active Nov 11, 2019
Custom ES6 errors in Node.js

Here's how you could create custom error classes in Node.js using latest ES6 / ES2015 syntax.

I've tried to make it as lean and unobtrusive as possible.

Defining our own base class for errors


You can’t perform that action at this time.