Skip to content

Instantly share code, notes, and snippets.

@revooms
revooms / .bash_aliases
Created August 20, 2018 08:00
My personal bash aliases
# Laravel
alias art="php artisan"
alias fresh='php artisan migrate:refresh --seed'
alias migrate="php artisan migrate"
alias nah='git reset --hard;git clean -df'
alias nrw="npm run watch"
alias t="vendor/bin/phpunit"
# Bash
alias df="df -h"
@revooms
revooms / pager.blade.php
Created August 7, 2018 15:03
Blade pager
@php
$hasFirstSeperator = false;
$hasLastSeperator = false;
$visibleButtons = 9; // odd number!!!
$first = 1;
$last = $p->lastPage();
$current = $p->currentPage();
// Main
$half = floor($visibleButtons / 2);
@revooms
revooms / official-lili-blog.md
Created July 25, 2018 08:17
A gist blog. About LiLi, a link list tool.

By revooms

@revooms
revooms / official-gistblog-blog.md
Last active July 23, 2018 15:41
Ein gist blog. Über gistblog.

Von revooms

@revooms
revooms / README.md
Last active January 25, 2025 20:14
A gist blog. About gistblog.

Powered by gistblog

@revooms
revooms / Bootstrap4-Variables.scss
Last active August 7, 2018 15:03
WebDev snippets: Bootstrap, jQuery, Vue, Blade
$grid-breakpoints: (
xs: 0,
sm: 600px,
md: 800px,
lg: 1000px,
xl: 1200px ) !default;
$container-max-widths: (
sm: 600px,
md: 800px,
@revooms
revooms / time2file.py
Created May 6, 2018 15:16
Python date & time
import time
def timeStamped(fmt='%H:%M:%S'):
return time.strftime(fmt).format()
with open('../time.txt','w') as outf:
outf.write(timeStamped())
[
{
"name": "Red",
"background-color": "rgb(176, 70, 50)"
},
{
"name": "Blue",
"background-color": "rgb(0, 121, 191)"
},
{
@revooms
revooms / va.css
Last active March 29, 2018 12:05
Vertical align image in container
.image-va { box-sizing: content-box; width:100%; height:100%; vertical-align: middle; text-align: center; background-color:lime}
.image-va img { border:0 !important; margin:0 !important; max-width: 100%; max-height: 100%; vertical-align: middle;}
.image-va .helper { display: inline-block; height: 100%; vertical-align: middle;}
@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 = '[email protected]:<YOURREPOSITORY>.git';
$app_dir = '/var/www/<YOURAPPDIR>';
# System settings, don't change a thing
$branch = str_replace("\n", '', `git rev-parse --abbrev-ref HEAD`);