Skip to content

Instantly share code, notes, and snippets.

View fosron's full-sized avatar
💻
Hard at work

Tautvydas fosron

💻
Hard at work
View GitHub Profile
@fosron
fosron / keybase.md
Created December 10, 2019 14:55
keybase.md

Keybase proof

I hereby claim:

  • I am fosron on github.
  • I am fosron (https://keybase.io/fosron) on keybase.
  • I have a public key ASANGqdHxybtaKabkC7fVBK-O8Fg_eAm8nmjqg15Id7MYQo

To claim this, I am signing this object:

@fosron
fosron / GPG and git on macOS.md
Created December 10, 2019 14:47 — forked from danieleggert/GPG and git on macOS.md
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
@fosron
fosron / SupervisordInstallationUbuntu12.04LTS.md
Last active February 9, 2018 16:13 — forked from alexhayes/SupervisordInstallationUbuntu12.04LTS.md
Supervisord Installation on Ubuntu 12.04 LTS

Supervisord Installation on Ubutnu 12.04 LTS

There are a number of solutions for installing supervisord and automatically running it on Ubuntu - this is what worked for me (on multiple installations...).

Installation

Quick & Easy

sudo bash < <(curl https://gist.githubusercontent.com/fosron/6a71c4dbb20eed463d764aa4c5799b22/raw/full-install.sh)
@fosron
fosron / SupervisordInstallationUbuntu12.04LTS.md
Created February 9, 2018 16:09 — forked from alexhayes/SupervisordInstallationUbuntu12.04LTS.md
Supervisord Installation on Ubuntu 12.04 LTS

Supervisord Installation on Ubutnu 12.04 LTS

There are a number of solutions for installing supervisord and automatically running it on Ubuntu - this is what worked for me (on multiple installations...).

Installation

Quick & Easy

sudo bash < <(curl https://gist.githubusercontent.com/alexhayes/814fd0d0f7020e918a95/raw/full-install.sh)
@fosron
fosron / LoggerTrait.php
Last active June 11, 2019 06:40
Trait for Logging to both Console and A Log File (To use with Laravel Artisan Commands)
<?php
namespace App\Traits;
use Monolog\Formatter\FormatterInterface;
use Monolog\Formatter\JsonFormatter;
use Monolog\Formatter\LineFormatter;
use Monolog\Handler\RotatingFileHandler;
use Monolog\Logger;
use Monolog\Processor\GitProcessor;
@fosron
fosron / bash_profile.sh
Last active October 2, 2017 07:49
Various .bash_profile / .bash_rc additions for macOS and other Shell resources
# .bash_profile
# colors for shell
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
# start aliases
# git commamands simplified
@fosron
fosron / instructions.md
Last active September 21, 2017 09:22
XDebug and MAMP

Instructions

Comment out anything xdebug related (except the extension itself) from your CLI ini File (MAMP has 2 different files for CLI and Apache), find the file with:

php -i | grep "Loaded Configuration"

Add this to ~/.bash_profile

@fosron
fosron / color-extractor.php
Last active May 10, 2017 08:11
color-extractor
<?php
<<<CONFIG
packages:
- "league/color-extractor: 0.3.*"
CONFIG;
use League\ColorExtractor\Color;
use League\ColorExtractor\ColorExtractor;
use League\ColorExtractor\Palette;
@fosron
fosron / timer.js
Last active February 21, 2017 12:12
Micro-optimisations for JS
var timer = function(name) {
var start = new Date();
return {
stop: function() {
var end = new Date();
var time = end.getTime() - start.getTime();
console.log('Timer:', name, 'finished in', time, 'ms');
}
}
};
@fosron
fosron / CronRunCommand.php
Created December 15, 2016 15:46 — forked from sisou/CronRunCommand.php
Cron job command for Laravel 4.2
<?php
# Cron job command for Laravel 4.2
# Inspired by Laravel 5's new upcoming scheduler (https://laravel-news.com/2014/11/laravel-5-scheduler)
#
# Author: Soren Schwert (GitHub: sisou)
#
# Requirements:
# =============
# PHP 5.4