Skip to content

Instantly share code, notes, and snippets.

@omept
omept / .DS_Store
Last active October 13, 2020 09:43
BookingController (Refactor Task)

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@omept
omept / docker-compose.yml
Created April 2, 2020 06:48 — forked from Mau5Machine/docker-compose.yml
Traefik Configuration and Setup
version: "3.3"
services:
################################################
#### Traefik Proxy Setup #####
###############################################
traefik:
image: traefik:v2.0
restart: always
@omept
omept / hello.go
Created February 12, 2020 22:08
hello world in go.
//first part
package main
// second part
import "fmt"
// third part
func main() {
var message string = myMessage() // Here I'm declaring a variable and naming it "message" and telling it the type of thing it must collect. Strings. The code below shows a great simple application that prints hello world to the screen
#steps
- copy your public ssh to clipboard
- make the .ssh directory if it doesn't exist
# mkdir -p ~/.ssh
- Create and open the ~/.ssh/authorized_keys file for editing using a terminal-based text editor, like nano
# nano ~/.ssh/authorized_keys
- Paste the contents of your SSH key into the file by right-clicking in your terminal and choosing Paste or by using a keyboard shortcut like CTRL+SHIFT+V. Then, save and close the file
@omept
omept / command_base_structure.php
Last active February 5, 2020 10:36
my laravel command structure.
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class MainCommand extends Command
{
/**
* The name and signature of the console command.
@omept
omept / short-number-format.php
Created May 21, 2019 07:08 — forked from RadGH/short-number-format.php
Short Number Formatter for PHP (1000 to 1k; 1m; 1b; 1t)
<?php
// Converts a number into a short version, eg: 1000 -> 1k
// Based on: http://stackoverflow.com/a/4371114
function number_format_short( $n, $precision = 1 ) {
if ($n < 900) {
// 0 - 900
$n_format = number_format($n, $precision);
$suffix = '';
} else if ($n < 900000) {