Skip to content

Instantly share code, notes, and snippets.

@polodev
polodev / zshconfig_alias
Last active January 31, 2017 05:59
zshconfig alias
alias gi="git init"
alias gs="git status"
alias gst="git stash"
alias gsa="git stash apply"
alias ga="git add ."
alias gc="git commit -m"
alias gce="git commit -am '______'"
alias gch="git checkout"
alias gp="git push origin"
alias gpom="git push origin master"
@polodev
polodev / google_map_static_image_url
Created November 25, 2016 05:05
google map static image url
https://maps.googleapis.com/maps/api/staticmap?center=" + latitude + "," + longitude + "&zoom=13&size=300x300&sensor=false
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:/Users/polodev/.composer/vendor/bin:/usr/sbin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/polodev/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="agnoster"
@polodev
polodev / console_log_in_react_native
Created January 27, 2017 05:14
console log only in production in react native
#in index.ios.js or index.android.js
global.LOG = (...args) => {
if (process.env.NODE_ENV === 'development') {
console.log('/------------------------------\\')
console.log('LOGGER', ...args)
console.log('\\------------------------------/')
}
return args[args.length - 1]
}
@polodev
polodev / iterm2-solarized.md
Created September 13, 2017 07:35 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@polodev
polodev / ubuntu_agnoster_install.md
Created September 13, 2017 07:53 — forked from renshuki/ubuntu_agnoster_install.md
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

@polodev
polodev / vscode.txt
Last active October 17, 2017 02:30
vscode setting
{
"vim.easymotion": true,
"vim.incsearch": true,
"vim.useCtrlKeys": false,
"vim.leader": ",",
"vim.hlsearch": true,
"editor.fontFamily": "'Fira Code', 'Fira Mono', Monaco, Menlo, monospace",
"editor.lineHeight": 20,
"editor.fontSize": 18,
"editor.formatOnPaste": true,
@polodev
polodev / sublime_keybindings.txt
Created October 13, 2017 23:23
sublime keybindings
[
//for changing vim mode in origin Vintage
{ "keys": ["j", "j"], "command": "exit_insert_mode",
"context":
[
{ "key": "setting.command_mode", "operand": false },
{ "key": "setting.is_widget", "operand": false }
]
},
//for changing to normal mode in vintageous
@polodev
polodev / laragon_website_listing
Created February 3, 2018 19:07
laragon_website_listing.txt
<?php
$dirs = array_filter(glob('*'), 'is_dir');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>all links</title>
<style>
body {
@polodev
polodev / alt_router_uses.txt
Created February 9, 2018 14:47
how to use altrouter with controller
<?php
require 'AltoRouter.php';
$router = new AltoRouter();
$router->map('GET','/', 'home_controller#index', 'home');
$router->map('GET','/dashboard/hello/world/from/dhaka', 'home_controller#hello', 'hello');
$router->map('GET','/content/[:parent]/?[:child]?', 'content_controller#display_item', 'content');
$match = $router->match();
// not sure if code after this comment is the best way to handle matched routes
list( $controller, $action ) = explode( '#', $match['target'] );