Skip to content

Instantly share code, notes, and snippets.

View judavi's full-sized avatar

Juan judavi

  • Palet Town
View GitHub Profile
@lheritage
lheritage / Alexa Demo Snippet
Last active January 31, 2018 18:45
This is snippets of code for the Alexa Demo built in meetups
// add at top
var http = require("http");
// In the Case IntentRequest switch statement , add this as new case
case "AddToListIntent":
console.log("We are going to add to List - AddToListIntent");
console.log("this is value" + req.body.request.intent.slots.item.value);
@qzaidi
qzaidi / pbewithmd5anddes.js
Last active June 1, 2020 22:09
Emulates Java's insecure PBEWITHMD5ANDDES with node.js crypto. Useful for interop with old java programs.
"use strict";
/*
* Emulates Java's PBEWITHMD5ANDDES for node.js
*/
var crypto = require('crypto');
var pbewithmd5anddes = {
KDF: function(password,salt,iterations) {
@mmattozzi
mmattozzi / package.json
Created May 9, 2017 00:28
HTTP echo server using node.js and express
{
"name": "mock-http-server",
"version": "1.0.0",
"description": "",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
@chluehr
chluehr / date_loop.sh
Created April 26, 2012 20:28
Bash: Loop over dates
#!/bin/bash
now=`date +"%Y-%m-%d" -d "05/06/2012"`
end=`date +"%Y-%m-%d" -d "05/23/2012"`
while [ "$now" != "$end" ] ;
do
now=`date +"%Y-%m-%d" -d "$now + 1 day"`;
echo $now
done
@marcinwol
marcinwol / compile_monero.sh
Created August 16, 2015 01:19
Ubuntu 14:04: compile CPUMiner/minerd (forked by LucasJones & Wolf) for Monero mining
# get git to install it
sudo apt-get install git
# dependencies
sudo apt-get install build-essential autotools-dev autoconf libcurl3 libcurl4-gnutls-dev
# download latest version
git clone https://github.com/wolf9466/cpuminer-multi
cd cpuminer-multi/
#!/bin/bash
PROGNAME=${0##*/}
INPUT=''
QUIET='0'
NOSTATS='0'
max_input_size=0
max_output_size=0
usage()
@sr75
sr75 / wget-jdk-oracle-install-example.txt
Last active March 16, 2023 11:28
wget command to install Oracle JAVA JDK from stupid oracle website for centos and ubuntu
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6
# rpm
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \
-O jdk-7-linux-x64.rpm
# ubuntu
@dsmrt
dsmrt / query-aws-logs-insights.bash
Last active December 14, 2023 11:27
Using AWS CLI to query CloudWatch Logs with Insights. Looking -30 mins to now.
# this script queries aws logs with insights filtering on ERROR
# explanation of start and end times
#--start-time = unix timestamp 30 mins in the past
#--end-time = unix timestamp now
QUERY_ID=$(aws logs start-query \
--profile $profile \
--log-group-name /aws/lambda/aap-event-consumer-dev \
--start-time `date -v-30M "+%s"` \
@yocontra
yocontra / kali-install.sh
Last active January 28, 2024 06:33
installing private internet access on kali linux
apt-get install network-manager-openvpn
wget https://www.privateinternetaccess.com/openvpn/openvpn.zip
mv openvpn.zip /etc/openvpn
cd /etc/openvpn
unzip openvpn.zip
rm -rf openvpn.zip
# set up the rest in the gui
# gateway = us-east.privateinternetaccess.com
# CA.crt will be in /etc/openvpn
@alexseward
alexseward / OculusQuestCloudGaming.md
Last active February 5, 2024 02:16 — forked from blixt/OculusQuestCloudGaming.md
Playing SteamVR games on the Oculus Quest

Inspired by https://gist.github.com/blixt/97009dfa3eb916dbd4624a38191fe10d and https://github.com/steventhegeek/Parsec-Cloud-Preparation-Tool. Thanks to @blixt and @steventhegeek :)

Setting up your Virtual Machine

We'll be creating a new Virtual Machine on Microsoft's cloud platform, Azure. The VM will have a beefy GPU just like a home computer so it can be used for playing games.

  1. Go to [the Azure portal][azure] and sign up or log in.
  2. If you are on a Free account, first go to Subscriptions and upgrade it to a Pay-as-you-go plan. Don't worry, you will get to keep any free credits you have. Azure's interface is a bit slow so this will take a minute.

⚠️ Make sure to not include any support plan because they will charge you monthly!