Skip to content

Instantly share code, notes, and snippets.

View tushar-borole's full-sized avatar
🎯
Working on React

Tushar Borole tushar-borole

🎯
Working on React
View GitHub Profile
@tushar-borole
tushar-borole / _spacing-helpers.scss
Created October 24, 2019 23:03 — forked from jacurtis/_spacing-helpers.scss
SASS Margin and Padding Helpers Loop. Generates .m-t-10 type helper classes.
/*
This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects.
It will generate several classes such as:
.m-r-10 which gives margin-right 10 pixels.
.m-r-15 gives MARGIN to the RIGHT 15 pixels.
.m-t-15 gives MARGIN to the TOP 15 pixels and so on.
.p-b-5 gives PADDING to the BOTTOM of 5 pixels
.p-l-40 gives PADDING to the LEFT of 40 pixels
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@tushar-borole
tushar-borole / iterm2-oh-my-fish.md
Created January 15, 2019 18:32 — forked from leymannx/iterm2-oh-my-fish.md
iTerm2 Solarized Dark theme + Fish shell + oh-my-fish /// macOS High Sierra
@tushar-borole
tushar-borole / terminal
Last active July 11, 2018 21:46
Terminal commands
#scp file
scp -i default.pem /Applications/Kqed/kqed-new.zip ec2-user@52.14.228.53:/home/ec2-user
#scp folder
scp /path/to/source-file user@host:/path/to/destination-folder/
#open current folder in webstorm
open -a WebStorm .
#run the shell script
@tushar-borole
tushar-borole / iterm2-solarized.md
Last active July 19, 2018 17:56 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@tushar-borole
tushar-borole / rebase
Last active August 7, 2018 08:42
Git rebase and push
#Keep your local branch in sync with the latest commits in master. When opening a pull request, you must rebase off the latest master before merging. Rebase several times a day to minimize merge conflicts and to keep your code current. In your feature/chore/bug branch, grab the latest master and rebase:
git fetch origin master && git rebase --interactive origin/master
#Then you’ll need to change the lines for each commit message you don’t want to show from ‘pick’ to ‘squash’.
# Once any conflicts are resolved:
git push --force origin feature-branch-name
#Force pushing should only be done to a feature branching, where only you created commits. Never force push to master (ever, ever).
@tushar-borole
tushar-borole / fullscreen.html
Created May 5, 2017 23:22
Responsive Vimeo, Youtube video
<style>
.embed-container {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
max-width: 100%;
height: auto;
}
.embed-container iframe,
@tushar-borole
tushar-borole / kill_process
Created May 3, 2017 04:55
Kill process on specific port
lsof -ti:8080 | xargs kill
@tushar-borole
tushar-borole / change_java_version
Created May 1, 2017 20:51
Change java version easily
function setjdk() {
if [ $# -ne 0 ]; then
removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin'
if [ -n "${JAVA_HOME+x}" ]; then
removeFromPath $JAVA_HOME
fi
export JAVA_HOME=`/usr/libexec/java_home -v $@`
export PATH=$JAVA_HOME/bin:$PATH
fi
<?php
/**
* Use * for origin
*/
add_action( 'rest_api_init', function() {
remove_filter( 'rest_pre_serve_request', 'rest_send_cors_headers' );
add_filter( 'rest_pre_serve_request', function( $value ) {
header( 'Access-Control-Allow-Origin: *' );
header( 'Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE' );