Skip to content

Instantly share code, notes, and snippets.

🤖
Life behind a keyboard

⭐ B3none b3none

🤖
Life behind a keyboard
Block or report user

Report or block b3none

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
@a7madgamal
a7madgamal / dark.md
Last active Oct 16, 2019
Dark mode for Slack on MacOS
View dark.md
@b3none
b3none / StatusCodeHandler.php
Created Sep 6, 2017
HTTP Error handling class
View StatusCodeHandler.php
<?php
class StatusCodeHelper
{
const ERROR_CODES = [
100 => 'Continue',
101 => 'Switching Protocols',
102 => 'Processing',
200 => 'OK',
201 => 'Created',
@kuo77122
kuo77122 / ubuntu_agnoster_install.md
Last active Mar 2, 2019 — forked from renshuki/ubuntu_agnoster_install.md
Ubuntu 14.04 (16.04) + Terminator + Oh My ZSH with Agnoster Theme
View ubuntu_agnoster_install.md

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

@justbill2020
justbill2020 / readme.md
Created Dec 21, 2016
Delete All Messages in a channel on discord
View readme.md
;(function(){
	const authToken = JSON.parse(localStorage.token);
	const channel = window.location.href.split('/').pop();
	const baseURL = `https://discordapp.com/api/channels/${channel}/messages`;
	const headers = {"Authorization": authToken };

	let clock = 0;
        let interval = 500;
@renshuki
renshuki / ubuntu_agnoster_install.md
Last active Oct 30, 2019
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme
View ubuntu_agnoster_install.md

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

@mandiwise
mandiwise / Count lines in Git repo
Last active Nov 6, 2019
A command to calculate lines of code in all tracked files in a Git repo
View Count lines in Git repo
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository
$ git ls-files | xargs wc -l
@julionc
julionc / 00.howto_install_phantomjs.md
Last active Oct 23, 2019
How to install PhantomJS on Debian/Ubuntu
View 00.howto_install_phantomjs.md

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@webdesserts
webdesserts / Gulpfile.js
Last active Aug 6, 2019
Automatically reload your node.js app on file change with Gulp (https://github.com/wearefractal/gulp).
View Gulpfile.js
// NOTE: I previously suggested doing this through Grunt, but had plenty of problems with
// my set up. Grunt did some weird things with scope, and I ended up using nodemon. This
// setup is now using Gulp. It works exactly how I expect it to and is WAY more concise.
var gulp = require('gulp'),
spawn = require('child_process').spawn,
node;
/**
* $ gulp server
* description: launch the server. If there's a server already running, kill it.
@embray
embray / suggest_backports.py
Last active Jul 26, 2019
List pull requests merged since the last tag on the given release branch which have not yet been merged into the release branch.
View suggest_backports.py
#!/usr/bin/env python
# I wasn't happy with any of the GitHub libraries for Python that I tried so I
# just used the GitHub API directly. If someone would like to rewrite this
# using a library please be my guest
from __future__ import unicode_literals
import argparse
import base64
@bartoszmajsak
bartoszmajsak / prepare-commit-msg.sh
Last active Nov 7, 2019
How to automatically prepend git commit with a branch name
View prepare-commit-msg.sh
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
You can’t perform that action at this time.