Skip to content

Instantly share code, notes, and snippets.

Read your blog post and iam very disappointed ! what is the purpose of that blog post? Internet is something which can be used for good but also for blowing things out of proportion.And this post and even KKs post symbolizes that! I agree that the combined fest is your idea but we trying to implement it and we need all your support not cynical views.
The people who persuaded you to write the Post must have also mentioned that we will have Tedx at nitte and also the Princy is happy with our work to grant us a budget upto 15 lacks! Iam sure the good things never came up.
About the timing, It was decided initially that the fest would be held in October it was not a sudden decision.And for holding the fest in a later time,right now there are only a few people who are working for the fest all the rest are either busy with their personal life or trying to get Twitter Mileage.Next Sem being very important Sem for us due to placements and projects the number of people who would strive for us would also decrease.An
#This module does all the encryption and decryption using OpenSSL ruby class
module EncryptionEngine
#encrypt method as the name suggest encrypts 'data' using 'algorithm' with 'key'
def encrypt( data, key, algorithm)
#Do not encrypt if data is nil
if !data.nil? && !data.empty?
cipher = OpenSSL::Cipher::Cipher.new algorithm
cipher.encrypt
class Hospital < ActiveRecord::Base
lambada :certified { where(:certified=>true).joins(:district) }
end
Hospital.scoped.certified
@djds4rce
djds4rce / responseInterceptor.js
Last active December 21, 2015 00:49
Http Response interceptor. Handles 401 requests from the server
//Works for 1.1.x versions. 1.0.x is similar and can be figured out using code comments
myapp.factory('myHttpResponseInterceptor',['$q','$location',function($q,$location){
return {
response: function(response){
return promise.then(
function success(response) {
return response;
},
function error(response) {
if(response.status === 401){
@djds4rce
djds4rce / requestInterceptor.js
Created August 13, 2013 17:05
A Angular Request Interceptor which modifies the configuration object to add auth token to url params of every http call to api server
//Works for 1.1.x versions. 1.0.x is similar and can be figured out using code comments
myapp.factory('httpRequestInterceptor', function ($cookieStore) {
return {
request: function (config) {
var token = $cookieStore.get("auth");
config.url = URI(config.url).addSearch({'_auth_token':token}).toString();
return config;
}
};
// Intercepting HTTP calls with AngularJS.
angular.module('MyApp', [])
.config(function ($provide, $httpProvider) {
// Intercept http calls.
$provide.factory('MyHttpInterceptor', function ($q) {
return {
// On request success
request: function (config) {
// console.log(config); // Contains the data about the request before it is sent.
<html class="no-js">
<head>
<title></title>
</head>
<body ng-app>
<h1>Model Binding Example| Hello World</h1>
<p>{{helloworld}}</p>
<input type='text' ng-model='helloworld'></input>
<script src="angular.js"></script>
@djds4rce
djds4rce / gist:6755530
Last active December 24, 2015 06:09
Understanding functional
variable_storing_a_function = Proc.new {|arg1,arg2| puts "First Argument : #{arg1}\nSecond Arguemt #{arg2}"}
variable_storing_a_function.call(1,2)
def an_example_function(variable1,variable2,&block)
sum = variable1+variable2
block.call(sum)
end
<span>{{group.members_count}} <ng-pluralize count='group.members_count'.
when="{'1': 'Member',
'other':'Members'}"></span>
##GeoViz
(Arun Ganesh)[https://en.wikipedia.org/wiki/User:Planemad]
(Sajjad Anwar)[https://geohacker.in/]
##OpenData
(Thejesh GN)[https://thejeshgn.com/]
##DataJournalism
(Avinash Celestine)[http://datastories.in]