Skip to content

Instantly share code, notes, and snippets.

View fhsinchy's full-sized avatar
🎯
Trying to focus

Farhan Hasin Chowdhury fhsinchy

🎯
Trying to focus
View GitHub Profile
use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
@fhsinchy
fhsinchy / yt-down.sh
Created July 3, 2019 10:29
download numbered videos from playlist with youtube-dl
youtube-dl --external-downloader aria2c --output "<folder name>/%(playlist_index)s-%(title)s.%(ext)s" <playlist link>
@fhsinchy
fhsinchy / django-vagrantfile
Last active September 22, 2019 16:42
vagrantfile for django development
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@fhsinchy
fhsinchy / poetry-virtualenv
Last active March 16, 2020 16:15
Python-poetry virtualenv location
MacOS - ~/Library/Caches/pypoetry/virtualenvs
Linux - ~/.cache/pypoetry/virtualenvs
@fhsinchy
fhsinchy / MySQLClient-MacOS
Last active March 30, 2020 19:19
Installation process for MySQLClient python package on MacOS
brew install mysql@5.7 mysql-connector-c openssl
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
brew services start mysql@5.7
xcode-select --install
brew unlink mysql@5.7
brew link --overwrite --force mysql-connector-c
@fhsinchy
fhsinchy / Python3-w-tk
Created April 5, 2020 17:40
Installation process of python 3 with tcl-tk and pyenv
brew install pyenv
brew install tcl-tk
# add these to your rc file
# tcl-tk
export PATH="/usr/local/opt/tcl-tk/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/tcl-tk/lib"
export CPPFLAGS="-I/usr/local/opt/tcl-tk/include"
export PKG_CONFIG_PATH="/usr/local/opt/tcl-tk/lib/pkgconfig"
export PYTHON_CONFIGURE_OPTS="--with-tcltk-includes='-I/usr/local/opt/tcl-tk/include' --with-tcltk-libs='-L/usr/local/opt/tcl-tk/lib -ltcl8.6 -ltk8.6'"
let globalThis = this;
function func1() {
let num = 5;
console.log(`num: ${num}`);
console.log('Global This: ', globalThis);
console.log('Local This: ', this);
console.log('Are they same?', globalThis === this);
}
let globalThis = this;
function func1() {
console.log('Global This: ', globalThis);
console.log('Local This: ', this);
console.log('Are they same?', globalThis === this);
}
func1()
let globalThis = this;
let obj1 = {
innerMethod: function() {
console.log('Global This: ', globalThis);
console.log('Local This: ', this);
console.log('Are they same?', globalThis === this);
console.log('Is this the object?', obj1 === this);
}
};