Skip to content

Instantly share code, notes, and snippets.

View rguruprakash's full-sized avatar
😬
in a deadlock

Guruprakash Rajakkannu rguruprakash

😬
in a deadlock
View GitHub Profile
{
"title": "Caps Lock to Hyper Key (Command-Ctrl)",
"rules": [
{
"description": "Hyper Key: map Caps Lock to Command-Ctrl (Escape if alone)",
"manipulators": [
{
"from": {
"key_code": "caps_lock",
"modifiers": {
@rguruprakash
rguruprakash / oauth_popup.js
Last active February 14, 2018 05:51
Oauth Popup
/**
* Opens a popup with given url and this popup will be polled by parent window for 'value' property on its window object.
* Once the 'value' property is set to true, the parent window will close the popup and trigger the given callback function.
* @param {string} url - url for popup
* @param {number} [pollInterval] - Interval in which to poll the popup window. (Default: 1000ms)
*/
function OauthPopup = function(url, pollInterval) {
this.url = url;
this.pollInterval = pollInterval || 1000;
}
@rguruprakash
rguruprakash / app.js
Created February 26, 2017 13:59
AngularJS: Share data between controllers with Service and Watchers
var myModule = angular.module('myModule', []);
myModule
.service('dataService', function($parse) {
var self = this;
return {
setData: function(data) {
self.data = data;
},
getData: function() {