Skip to content

Instantly share code, notes, and snippets.

View n4nagappan's full-sized avatar
🔍
Exploring OSS

n4nagappan

🔍
Exploring OSS
View GitHub Profile
@n4nagappan
n4nagappan / sample.ts
Created December 13, 2019 09:26
Redis Key expiry notification
export namespace RedisExpiryNotification {
const callbackMap: any = {}
const PREFIX = '__keyspace@?__:'
redisClient.send_command(
'config',
// ['set', 'notify-keyspace-events', 'Ex'],
['set', 'notify-keyspace-events', 'Kx'],
RedisExpiryNotification.onRedisKeyExpiredCallback
)
version: 2
jobs:
build:
docker:
- image: circleci/node:8.10
working_directory: ~/repo
steps:
- checkout
@n4nagappan
n4nagappan / Basic API call.yaml
Created April 21, 2018 13:54
Executes a basic Excel API call - Shared with Script Lab
name: Basic API call
description: Executes a basic Excel API call
author: n4nagappan
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
async function run() {
#!/bin/bash
sudo apt-get install bzip2
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O ~/miniconda.sh
bash ~/miniconda.sh -b -p $HOME/miniconda
echo 'export PATH="$HOME/miniconda/bin:$PATH"' >> ~/.bashrc
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash && \
source ~/.nvm/nvm.sh && \
nvm install stable && \
nvm alias default stable && \
nvm use default && \
npm install -g bunyan
@n4nagappan
n4nagappan / Semantics3RateThrottling
Created April 21, 2015 08:21
Testing out rate throttling
/*
* Simple test script to showcase use of semantics3-node to interface
* with Semantics3 Products API.
*
* Quickstart guide: https://semantics3.com/quickstart
* API Documentation: https://semantics3.com/docs
*
* Author: Nagappan Nachiappan <nagappan@semantics3.com>
* Copyright (c) 2013 Semantics3 Inc.
*
@n4nagappan
n4nagappan / .screenrc
Created March 8, 2015 00:15
.screenrc file
defscrollback 5000
altscreen on
autodetach on
vbell off
caption always " | %-w%{= BW}%40L>%n %t%{-}%+w |%<"
hardstatus alwayslastline
# Turn off that annoying start up message
startup_message off
# Turn the even more annoying whole-screen-flash-on-tab-complete "feature"
vbell off
// Testing if code snippets work...
function foo(){
alert("Hello World");
}
{
"total_results_count": 1,
"code": "OK",
"offset": 0,
"results_count": 1,
"results": [
{
"cat_id": "23130",
"ean": "0883974958450",
"model": "PT225U 004004;Z830 S8301",
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install tcl8.5
cd ~
mkdir redis
cd redis
wget http://download.redis.io/releases/redis-2.8.9.tar.gz
tar xzf redis-2.8.9.tar.gz
cd redis-2.8.9
make