Skip to content

Instantly share code, notes, and snippets.

Ramesh Nair hiddentao

Block or report user

Report or block hiddentao

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Verifying my Peepeth
Verifying my identity on Peepeth.com 0xb1b6e377aa6ec6928a1d499ae58483b2b99658ec
@hiddentao
hiddentao / RoleBasedAcl.sol
Last active Apr 13, 2018
Ethereum solidity contract for role-based access control
View RoleBasedAcl.sol
pragma solidity ^0.4.10;
contract RoleBasedAcl {
address creator;
mapping(address => mapping(string => bool)) roles;
function RoleBasedAcl () {
creator = msg.sender;
}
@hiddentao
hiddentao / JustGive.sol
Created Jun 13, 2017
A crowd-funded donation wallet with a minimum cap. All ETH is returned to contributors if minimum cap not reached. All funding passed onto payee. Multiple authorizers allowed.
View JustGive.sol
pragma solidity ^0.4.10;
contract SimpleAccessControl {
address public creator;
mapping authorized(address => bool);
function AccessControl () {
creator = msg.sender;
}
@hiddentao
hiddentao / LinkedInPYMKBulkInvite.js
Last active Feb 14, 2017
Linked-In Auto-send all People You May Know invites
View LinkedInPYMKBulkInvite.js
/*
For use on: "My Network" page
This will first load full list of invite suggestions by auto-scrolling to bottom of page.
Once no more suggestions are left to load it will auto-connect to all by clicking all
Connect buttons (with 100ms interval between each click).
How to run: Run the below code in your browser's Javascript console (see
Developer Tools in chrome). DO NOT close or change the browser tab whilst this is running.
View squel.js
'use strict';
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constr
@hiddentao
hiddentao / gist:d642a16c7b04b79e584a
Last active Jan 15, 2016
Cron backup script for Mongo db that deletes backups older than 14 days
View gist:d642a16c7b04b79e584a
#!/bin/bash
MONGO_DATABASE="name here"
APP_NAME="name of app"
MONGO_HOST="127.0.0.1"
MONGO_PORT="27017"
TIMESTAMP=`date +%F-%H%M`
MONGODUMP_PATH="/usr/bin/mongodump"
BACKUPS_DIR="/opt/backup/$APP_NAME"
View topNavMenu.js
[
{
id: 'living',
label: 'Living',
children: [
{
id: 'products',
label: 'Products',
children: [
{
@hiddentao
hiddentao / gist:0c9137e72493e3be26ce
Last active Aug 29, 2015
Gulp + Browserify + Watchify for building JS code
View gist:0c9137e72493e3be26ce
browserify = require 'browserify'
source = require 'vinyl-source-stream2'
uglify = require 'gulp-uglify'
watchify = require 'watchify'
gulp = require 'gulp'
gutil = require 'gulp-util'
gulp.task 'js', ->
_process = (b) ->
@hiddentao
hiddentao / setupHipChat.js
Last active Aug 29, 2015
Setting up a HipChat room notifier in a Waigo startup step
View setupHipChat.js
"use strict";
var HipChatter = require('hipchatter'),
Q = require('bluebird');
var _ = require('waigo')._;
module.exports = function*(app) {
if (app.config.hipChat) {
@hiddentao
hiddentao / patch.diff
Last active Aug 29, 2015
Fix Soundcloud is Gold Wordpress plugin (v2.2.2) to work when using Wordpress with HTTPS
View patch.diff
diff --git a/wp-content/plugins/soundcloud-is-gold/soundcloud-is-gold-functions.php b/wp-content/plugins/soundcloud-is-gold/soundcloud-is-gold-functions.php
index e2eefe3..48f01b0 100644
--- a/wp-content/plugins/soundcloud-is-gold/soundcloud-is-gold-functions.php
+++ b/wp-content/plugins/soundcloud-is-gold/soundcloud-is-gold-functions.php
@@ -610,18 +610,20 @@ function soundcloud_is_gold_player($id, $user, $autoPlay, $comments, $width, $cl
$player = '<div class="soundcloudIsGold '.esc_attr($classes).'" id="soundcloud-'.esc_attr($id).'">';
+ $httpPrefix = (is_ssl() ? 'https' : 'http');
+
You can’t perform that action at this time.