Skip to content

Instantly share code, notes, and snippets.

@revooms
revooms / gm_sde.user.js
Last active August 29, 2015 14:07
greasemonkey: Steam Discussions Enhancements (SDE)
// ==UserScript==
// @name Steam Discussions Enhancements
// @namespace sde
// @description Steam Discussions Enhancements
// @include http*://steamcommunity.com/app/*/discussions/*
// @include http*://steamcommunity.com/id/*/commentnotifications/
// @include http*://steamcommunity.com/id/*/home/invites/
// @version 0.1
// @grant none
@revooms
revooms / Reader greasmonkey collection
Last active August 29, 2015 14:18
Reader greasmonkey collection.
Reader is a collection of layout and style changes to make webpages more readable on large displays.
@revooms
revooms / alias
Created December 18, 2015 11:26
Linux shell aliase
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
alias apti='sudo apt-get install'
alias apts='apt-cache search'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --colour=auto'
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -alF'
alias ls='ls --color=auto'
@revooms
revooms / shutdown.bat
Last active October 7, 2018 00:33
Windows shutdown
shutdown /s /t 7200
# shutdown /a - Aborts shutdown
@revooms
revooms / gist:8080b6b4a58f1b0a77cf845d87329ec8
Last active October 7, 2016 09:51
Getting started with Laravel on Heroku

https://devcenter.heroku.com/articles/getting-started-with-laravel

Creating a Laravel application

The application in this tutorial is based on the Laravel Installation guide. It’s worth a read before following the instructions in this article. Installing a new Laravel project

The composer create-project command is one of the ways you can bootstrap a new project based on the laravel/laravel standard application skeleton. The command below sets it up in a directory named hello_laravel_heroku using the latest version of the framework.

After downloading an extensive number of dependencies and running a few hooks, Composer will have set up a fully functional project in the directory you specified, so you can cd to it.

Undo a commit and redo

$ git commit -m "Something terribly misguided"              (1)
$ git reset HEAD~                                           (2)
<< edit files as necessary >>                               (3)
$ git add ...                                               (4)
$ git commit -c ORIG_HEAD                                   (5)
  1. This is what you want to undo
@revooms
revooms / byobuCommands
Last active March 20, 2017 14:58 — forked from jshaw/byobuCommands
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@revooms
revooms / install-laravel.sh
Created May 13, 2017 13:48 — forked from bigbeno37/install-laravel.sh
Install Laravel 5.4, MySQL 5.7, Apache2.4 and PHP7.1 on Ubuntu 16.04
# CREATED BY BEN O'SULLIVAN / BIGBENO37 (GITHUB.COM/BIGBENO37)
# LICENSED UNDER CREATIVE COMMONS 'Attribution 4.0 International' LICENSE
# https://creativecommons.org/licenses/by/4.0/
# FEEL FREE TO USE AND ADAPT THIS SCRIPT IN COMMERCIAL AND NON COMMERICAL PRODUCTS
# AS LONG AS PROPER ACCREDITATION IS GIVEN
# VARIABLES
echo -e "\x1B[01;95mWhat would you like to name your Laravel project?\x1B[0m"
read LARAVEL_PROJECT_NAME
@revooms
revooms / useful-shell-commands.md
Last active September 30, 2017 23:53
Useful shell commands

Get 10 largest directories

find . -type d -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}

Get 10 largest files

find . -type f -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}
@revooms
revooms / Envoy.blade.php
Last active July 17, 2018 07:48
Little Laravel Helpers and Snippets
# https://docs.gitlab.com/ce/ci/examples/laravel_with_gitlab_and_envoy/index.html
#
# Usage: envoy run deploy
@setup
$repository = 'git@gitlab.com:<YOURREPOSITORY>.git';
$app_dir = '/var/www/<YOURAPPDIR>';
# System settings, don't change a thing
$branch = str_replace("\n", '', `git rev-parse --abbrev-ref HEAD`);