This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git filter-branch --commit-filter \ | |
'if [ "$GIT_AUTHOR_EMAIL" = "old_email" ]; then \ | |
export GIT_AUTHOR_NAME="Shiva Bhusal";\ | |
export GIT_AUTHOR_EMAIL=new_emil;\ | |
export GIT_COMMITTER_NAME="Shiva Bhusal";\ | |
export GIT_COMMITTER_EMAIL="new_emailu@gmail.com";\ | |
fi;\ | |
git commit-tree "$@"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include all the preexisting configs | |
include "/usr/share/nano/*.nanorc" | |
set linenumbers | |
set tabsize 4 | |
set tabstospaces |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
int* getSum(int a, int b){ | |
/* Local var stored in `heap` instead of `stack` */ | |
int* sum = malloc(sizeof(int)); | |
*sum = a + b; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include "../cspec/cspec.c" | |
// Withour this line, compiler wont compile your code. | |
// error: `some_var_declared_somewhere` undeclared (first use in this function) | |
extern int some_var_declared_somewhere; | |
void test_runner(void); | |
void main(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include "../cspec/cspec.c" | |
int * some_function(){ | |
static int fun_call_counter = 0; | |
fun_call_counter++; | |
return &fun_call_counter; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {combineReducers, createStore} from 'redux'; | |
const usersReducer = (usersState = [], action) => { | |
const new_state = Object.assign([], usersState); | |
switch (action.type) { | |
case 'UPDATE_USER': { | |
var updateable_record = new_state.find((item) => item.id === action.payload.id); | |
new_state[new_state.indexOf(updateable_record)] = Object.assign({}, updateable_record, action.payload); | |
break; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GIT | |
remote: git://github.com/spree-contrib/spree_mail_settings.git | |
revision: d416a1e355893bda625ed5bea187d39526aa52f9 | |
branch: 3-0-stable | |
specs: | |
spree_mail_settings (3.0.0) | |
spree_backend (~> 3.0.0) | |
GIT | |
remote: git://github.com/spree/spree_auth_devise.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sample Order | |
<Spree::Order:0x007fa6d37b52d8 | |
id: 6, | |
number: "R141192317", | |
item_total: #<BigDecimal:7fa6d3d37d28,'0.1999E2',18(27)>, | |
total: #<BigDecimal:7fa6d39816c0,'0.2599E2',18(27)>, | |
state: "complete", | |
adjustment_total: #<BigDecimal:7fa6d3d37b48,'0.1E1',9(18)>, | |
user_id: 4, | |
completed_at: Thu, 10 Mar 2016 03:24:55 UTC +00:00, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# spec/support/wait_for_ajax.rb | |
# There is inbuild `wait_for_ajax` method in selinium WebDriver library | |
# This is for Capybara Webkit only | |
# # | |
module WaitForAjax | |
def wait_for_ajax(timeout = Capybara.default_wait_time) | |
Timeout.timeout(timeout) do | |
active = page.evaluate_script('jQuery.active') | |
until active == 0 | |
active = page.evaluate_script('jQuery.active') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# spec/support/wait_for_ajax.rb | |
# There is inbuild `wait_for_ajax` method in selinium WebDriver library | |
# This is for Capybara Webkit only | |
# # | |
module WaitForAjax | |
def wait_for_ajax | |
Timeout.timeout(Capybara.default_max_wait_time) do | |
loop until finished_all_ajax_requests? | |
end | |
end |