Skip to content

Instantly share code, notes, and snippets.

View taoeffect's full-sized avatar

Greg Slepak taoeffect

View GitHub Profile
@Wack0
Wack0 / gist:17c56b77a90073be81d3
Last active July 23, 2021 12:54
It's not just superfish that's the problem.
Superfish uses an SDK from Komodia to do SSL MITM. That's probably known by now.
Superfish isn't the only product to use that sdk. there's others too.
Each product that uses the Komodia SDK to MITM, has its OWN CA cert and private
key pair. Seems a lot of people think they all use the superfish cert. That is
NOT the case.
First thing I checked was komodia's own parental control software,
Keep My Family Secure. (mentioned on komodia's own website).
@frozeman
frozeman / mistweb3.js
Last active July 22, 2021 01:00
Mist web3 loading proposal
/*
Basically "web3" comes from Mist,
but "Web3" CAN come from the dapp.
A Dapp has 3 ways to use web3.
2. and 3. would work when in Mist and outside.
*/
// 1. simply use, web3 comes already defined
@F1LT3R
F1LT3R / ytm3.sh
Last active September 11, 2020 19:48
Split long YouTube Videos into 5min MP3 Segments
#!/bin/bash
# USAGE: ytm3 https://www.youtube.com/watch\?v\=rQLBitV69Cc
# DESCRIPION: Download Audio from YouTube videos, Convert to split MP3s (5 Min)
# PURPOSE: Studying w/ iPod shuffle
# PRE-REQS: Node.js, YTDL, FFMPEG
# Author: F1LT3R.io
for URL in $@
do
@ethers
ethers / call-then-sendtx-pattern.js
Last active July 24, 2020 05:51
call-then-sendtx pattern for Ethereum Dapps
/*
In Ethereum, a contract can be written so that it returns a value for eth_call.
A Dapp can then check for success or error value of eth_call, before calling eth_sendTransaction,
to take advantage of eth_call effectively being a "preview" of the code flow that the transaction
will take. In traditional client-server, clients can't ask servers beforehand what's going to
happen when the client makes a call; with Dapps contracts can be written so that clients can ask
for a "preview" of what is going to happen, before any funds/ethers are actually utilized
(eth_call does not cost any ethers).
Note: it is possible that in between eth_call and when eth_sendTransaction is actually mined,
@markbeee
markbeee / nest.json
Created January 22, 2016 21:40
GoogleNestDataFields
{
"talkback_stream_host": "stream-delta.dropcam.com:443",
"is_streaming_enabled": true,
"last_connected_time": redacted,
"direct_nexustalk_host": "redacted",
"timezone": "redacted",
"id": redacted,
"live_stream_host": "redacted",
"description": "",
"combined_software_version": "redacted",
@markbeee
markbeee / nest1.json
Created January 22, 2016 21:42
GoogleNestDataFields1
{
"alt_heat_delivery": "forced-air",
"alt_heat_source": "gas",
"alt_heat_x2_delivery": "forced-air",
"alt_heat_x2_source": "gas",
"auto_away_enable": true,
"auto_away_reset": false,
"auto_dehum_enabled": false,
"auto_dehum_state": false,
"aux_heat_delivery": "forced-air",
@markbeee
markbeee / nest.go
Created January 22, 2016 21:44
GoogleNestGo
package main
import (
"bytes"
"encoding/json"
"errors"
"fmt"
flags "github.com/jessevdk/go-flags"
"io"
"io/ioutil"
#---------------------------------------------------------------------
# General user
#---------------------------------------------------------------------
myid=`id -u`
myd=`date "+%Y-%m-%d-%H-%M"`
#-------------------------
# Defaults write
#-------------------------
@Chouser
Chouser / externs_for_cljs.clj
Created June 17, 2013 13:44
Generate an externs.js file for arbitrary JS libraries for use in advanced Google Closure compilation, based on the ClojureScript code that uses the libraries.
(ns n01se.externs-for-cljs
(:require [clojure.java.io :as io]
[cljs.compiler :as comp]
[cljs.analyzer :as ana]))
(defn read-file [file]
(let [eof (Object.)]
(with-open [stream (clojure.lang.LineNumberingPushbackReader. (io/reader file))]
(vec (take-while #(not= % eof)
(repeatedly #(read stream false eof)))))))
@jfet97
jfet97 / _objectsFlattening.js
Last active June 12, 2019 23:02
objects flattening
const obj = { a: { b: 1, c: 2, d: { e:4 , f:[1,2,3,4,5,6,7,8,9,0]} }, g:42 };
const res = Object.fromEntries(flatProps(objectRecursiveEntries(obj)));
/*
{
"a.b": 1,
"a.c": 2,
"a.d.e": 4,
"a.d.f.0": 1,
"a.d.f.1": 2,