Skip to content

Instantly share code, notes, and snippets.

View Shipu's full-sized avatar
🎯
Focusing

Shipu Ahamed Shipu

🎯
Focusing
View GitHub Profile
@Shipu
Shipu / AdapterPattern.php
Created May 9, 2020 15:33
Adapter pattern real life example
<?php
interface SocialInterface
{
public function getFriends();
public function getPosts();
}
class Facebook implements SocialInterface
{
@Shipu
Shipu / revue-badge.svg
Created May 15, 2020 09:29
revue badge svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
apt update
// Start Docker installation
apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
@Shipu
Shipu / countries.php
Created July 3, 2020 11:16
Countries list in php
<?php
return [
[
'id' => 1,
'name' => 'Afghanistan',
'country_code' => 'AF',
'dial_code' => '+93',
'currency_name' => 'Afghanafgani',
@Shipu
Shipu / MySQL_5-7_macOS.md
Created September 14, 2020 08:41 — forked from robhrt7/MySQL_5-7_macOS.md
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
wget https://s3-us-west-2.amazonaws.com/jrpublic/mac/swaggymnia
chmod +x swaggymnia
./swaggymnia --help
./swaggymnia generate -i ~/Desktop/Insomnia_2020-09-20.json -c ~/Desktop/config.json -o yaml
config.json
{
# python 2
# git fsck --full
import subprocess
hashes=["01b6a7f272375bc99d98be0068c273b5bc4e9ff6",
"03620d7b53c8a48314c25a3ecdbe369553b01340","PUTYOUR HASHEZ HERE"]
for myhash in hashes:
print "HASH", myhash
bashCommand = "git cat-file -p "+ myhash
process = subprocess.Popen(bashCommand.split(), stdout=subprocess.PIPE)
@Shipu
Shipu / List.md
Created May 1, 2021 00:50 — forked from msurguy/List.md
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):

@Shipu
Shipu / coffee.php
Created July 28, 2021 06:53
Strategy Pattern
<?php
interface Coffee
{
public function make();
}
class Cappuccino implements Coffee
{
public function make()
@Shipu
Shipu / .zshrc
Created September 22, 2021 19:18
shipu custom
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/shipu/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes