Skip to content

Instantly share code, notes, and snippets.

View abmruman's full-sized avatar

ABM Ruman abmruman

View GitHub Profile
@abmruman
abmruman / lumen.artisan.key.generate.sh
Last active February 12, 2020 15:00
Lumen alternative for `php artisan key:generate`
#!/bin/bash
# Author: ABM Ruman <abm.ruman@gmail.com>
# Substitute for `php artisan key:generate` in lumen (requires a 32bit string as APP_KEY)
# Copy `.env.example` to `.env` first, if you havn't already.
# Generates 32bit pseudo-random alphaneumaric string (https://gist.github.com/earthgecko/3089509)
# and replaces it with APP_KEY value
# Note: this regular expression is for testing alphaneumaric string only, it will not work with Laravel,
@abmruman
abmruman / bash.generate.random.alphanumeric.string.sh
Created January 19, 2020 12:30 — forked from earthgecko/bash.generate.random.alphanumeric.string.sh
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
@abmruman
abmruman / docker-help.md
Created January 11, 2020 21:56 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@abmruman
abmruman / ascii.c
Last active January 19, 2020 16:45
Prints any character you enter in keyboard as ascii form
#include <stdio.h>
int main () {
char ch='c';
printf("Press 'Esc' or 'Ctrl+C' to stop.\n");
while (ch != 27)
printf ("(%d) ",ch = getche());
return 0;
}