Skip to content

Instantly share code, notes, and snippets.

@pradeepkumargali
pradeepkumargali / remote-secure.yaml
Last active January 2, 2019 16:31
Gremlin Console To Tinker Top Server
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@pradeepkumargali
pradeepkumargali / HTMLTOText.R
Created August 13, 2018 13:45
HTML to Text in R
# Author: Tony Breyal
# Date: 2011-11-18
# Modified: 2011-11-18
# Description: Extracts all text from a webpage (aims to extract only the text you would see in a web browser)
# Packages Used: RCurl, XML
# Blog Reference: Not published
# Copyright (c) 2011, under the Creative Commons Attribution-NonCommercial 3.0 Unported (CC BY-NC 3.0) License
# For more information see: https://creativecommons.org/licenses/by-nc/3.0/
# All rights reserved.
@pradeepkumargali
pradeepkumargali / dockercmd.sh
Last active November 30, 2017 09:01
Docker Commands on CentOS 7
#Build a docker image using DockerFil
docker build -t gengine-python-app .
#Pruning Commands
docker container prune
docker image prune
#Run docker image with the posts exposed
docker run -d -p 8667:8667 gengine-python-app
#Link to an diffrent image
@pradeepkumargali
pradeepkumargali / odicstrategy.js
Last active October 17, 2017 09:16
ODIC Strategy Azure AD
passport.use(new Strategy({
domain: process.env.AUTH0_DOMAIN,
clientID: process.env.AUTH0_CLIENT_ID,
clientSecret: process.env.AUTH0_CLIENT_SECRET,
callbackURL: process.env.AUTH0_CALLBACK_URL,
passReqToCallback: true
},
function(req, issuer, audience, profile, accessToken, refreshToken, params, cb) {
console.log('issuer',issuer); // https://your-domain.auth0.com/
@pradeepkumargali
pradeepkumargali / jenkins_update.sh
Last active October 16, 2017 06:41
Jenkins Update
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
sudo rpm --import http://pkg.jenkins-ci.org/redhat-stable/jenkins-ci.org.key
sudo yum update jenkins
@pradeepkumargali
pradeepkumargali / babelLaunch.js
Created October 10, 2017 07:06
babel-node VS Code
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/src/server.js",
"stopOnEntry": false,
"args": [],
@pradeepkumargali
pradeepkumargali / google_birthday_spinner.json
Created October 3, 2017 12:03
Google Birthday Spinner JSON
{
"messages": [
"Chrome Arpeggio Links",
"Fischinger Links",
"Hip Hop Links",
"15th Birthday Links",
"Cricket Links",
"Halloween 2016 Links",
"Beethoven Links",
"Rockmore Links",
@pradeepkumargali
pradeepkumargali / dockercentosinstall
Created August 4, 2017 08:20
Docker CentOS Setup
df
df -H
cat /proc/meminfo
sudo yum remove docker docker-common docker-selinux docker-engine
yum remove docker docker-common docker-selinux docker-engine
sudo yum remove docker docker-common docker-selinux docker-engine
yum
yum list
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
@pradeepkumargali
pradeepkumargali / pyinstall.sh
Created April 13, 2017 16:09
Download, compile and install Python
#The --no-check-certificate is optional
cd /opt
wget --no-check-certificate https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz
tar xf Python-2.7.6.tar.xz
cd Python-2.7.6
./configure --prefix=/usr/local
make && make altinstall
@pradeepkumargali
pradeepkumargali / pouchattachment.js
Created December 19, 2016 10:58
Store and retrieve attachment in Pouch DB using Angular/Ionic
$scope.storeFile = function () {
//Use Sqllite
var db = new PouchDB('mydb.db', {
adapter: 'cordova-sqlite'
});
//Create index - pouchdb-find plugin
db.createIndex({
index: {
fields: ['name'],
name: 'nameidx'