Skip to content

Instantly share code, notes, and snippets.

View nimaparsi's full-sized avatar
🏠
Working from home

Nima Parsi nimaparsi

🏠
Working from home
  • Furthermore - Hall & Partners
  • London
  • 22:46 (UTC +01:00)
View GitHub Profile
/* http://jsbin.com/tipixiy/edit?js,output */
/**
* Seems to be in line with this
* http://stackoverflow.com/questions/24147331/react-the-right-way-to-pass-form-element-state-to-sibling-parent-elements
* Now I have the state in parent and child. Is that good or bad? Why would I need it in child?
* Could probably take that out
* Another Example http://jsbin.com/pidipad/edit?js,output
* */
class Parent extends React.Component {
git remote -v
git remote set-url origin
git remote set-url origin <username>git@bitbucket.org:organization/wordpress.git
git remote set-url origin username@bitbucket.org:organization/wordpress.git
ssh-keygen -f ~/.ssh/username
ssh-add ~/.ssh/username
pbcopy < ~/.ssh/username.pub
@nimaparsi
nimaparsi / keybase.md
Last active October 2, 2017 19:01
keybase.md

Keybase proof

I hereby claim:

  • I am nimaparsi on github.
  • I am nimaa (https://keybase.io/nimaa) on keybase.
  • I have a public key ASD7ha3jztS_lflYNgxDKuoBu8KsV7-gEZi4sORBGrcXwgo

To claim this, I am signing this object:

# reset to branch
git reset --hard origin/master
# Reset at the head of a commit
git log
git reset #HASH --hard
git log
git push origin -f branchName
grails run-app -Dgrails.env=hk,hk_preview
@nimaparsi
nimaparsi / git
Created August 10, 2016 09:35
remove ssh GIT
$ exec ssh-agent bash
$ ssh-add
function parallax() {
window.onscroll = function() {
var speed = 5.0;
document.body.style.backgroundPosition = (-window.pageXOffset/speed)+"px "+(-window.pageYOffset/speed)+"px";
}
}
parallax();
// app
var app = angular.module('angularjs-starter', []);
app.controller('MainCtrl', function($scope) {
$scope.message = 'World';
$scope.GiantList = [{name: 'one'}, {name: 'two'}, {name: 'three'}];
$scope.saveData= {};
var $window = $(window);
$window.on('scroll', function () {
var y1 = $(window).scrollTop();
var content = $('.cus_des .foreground');
var change = parseInt(y1 * -0.19, 10);
content.filter(function () {
var thisContent = $(this);
return thisContent.offset().top < (y1 + $(window).height()) && thisContent.offset().top + thisContent.height() > y1;
}).css({
'background-position': 'center ' + change + 'px'
// Detect windows width
var tab = window.matchMedia("(min-width: 786px) and (max-width: 990px)");
var mob = window.matchMedia("(max-width: 786px)");
var des = window.matchMedia("(min-width: 990px)");
tab.addListener(WidthChange);
mob.addListener(WidthChange);
des.addListener(WidthChange);
WidthChange(tab, mob, des);
function WidthChange(mq) {