Skip to content

Instantly share code, notes, and snippets.

View Shipu's full-sized avatar
🎯
Focusing

Shipu Ahamed Shipu

🎯
Focusing
View GitHub Profile
# 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)
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
{
@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.
@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',
apt update
// Start Docker installation
apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
@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.
@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 / countries.json
Last active September 22, 2020 18:37
Countries currency details
[
{"id":1,"name":"Afghanistan","country_code":"AF","dial_code":"+93","currency_name":"Afghanafgani","currency_code":"AFN","currency_symbol":"؋","created_at":"2020-04-1017:37:33","updated_at":"2020-04-1017:37:48"},
{"id":2,"name":"AlandIslands","country_code":"AX","dial_code":"+358","currency_name":"","currency_code":"","currency_symbol":"","created_at":"2020-04-1017:37:33","updated_at":"2020-04-1017:37:48"},
{"id":3,"name":"Albania","country_code":"AL","dial_code":"+355","currency_name":"Albanianlek","currency_code":"ALL","currency_symbol":"L","created_at":"2020-04-1017:37:33","updated_at":"2020-04-1017:37:48"},
{"id":4,"name":"Algeria","country_code":"DZ","dial_code":"+213","currency_name":"Algerian dinar","currency_code":"DZD","currency_symbol":"د.ج","created_at":"2020-04-1017:37:33","updated_at":"2020-04-1017:37:48"},
{"id":5,"name":"American Samoa","country_code":"AS","dial_code":"+1684","currency_name":"","currency_code":"","currency_symbol":"","created_at":"2020-04-1017:37:33","updat
@Shipu
Shipu / string-eval.php
Created December 25, 2019 12:01
String with function
<?php
function day($value) {
return date('d', strtotime($value));
}
function equal($one, $second) {
return $one == $second;
}
@Shipu
Shipu / .env7-1
Last active October 27, 2019 06:19
Laradock Configuration
###########################################################
###################### General Setup ######################
###########################################################
### Paths #################################################
# Point to the path of your applications code on your host
APP_CODE_PATH_HOST=../7.1/
# Point to where the `APP_CODE_PATH_HOST` should be in the container