Skip to content

Instantly share code, notes, and snippets.

View a7medfahmy94's full-sized avatar

Ahmed Fahmy a7medfahmy94

  • Computek
  • Dokki, Giza
View GitHub Profile
@a7medfahmy94
a7medfahmy94 / redis.sh
Created February 13, 2017 12:43
a non-interactive version of the Redis install_server.sh file
#!/bin/sh
# Copyright 2011 Dvir Volk <dvirsk at gmail dot com>. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
angular.module('app').run(function($rootScope, $state, localStorageService) {
$rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams) {
var prefix = "stateParams.";
var fromStateName = prefix + fromState.name;
var toStateName = prefix + toState.name;
var f = true;
for (var k in toState.params) {
f = f && (JSON.stringify(toParams[k]) == JSON.stringify(toState.params[k]));
}
guard :spork, :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do
watch('config/application.rb')
watch('config/environment.rb')
watch('config/environments/test.rb')
watch(%r{^config/initializers/.+\.rb$})
watch('Gemfile.lock')
watch('spec/spec_helper.rb') { :rspec }
watch('test/test_helper.rb') { :test_unit }
watch(%r{features/support/}) { :cucumber }
end
@a7medfahmy94
a7medfahmy94 / StaticDynamicBinding.java
Created December 24, 2014 08:53
Static VS Dynamic Binding in Java
import java.util.*;
import java.lang.*;
import java.io.*;
class A{
public void print(){
System.out.println("A is called");
}
}