Skip to content

Instantly share code, notes, and snippets.

View adumont's full-sized avatar
😃

Alexandre Dumont adumont

😃
View GitHub Profile
@adumont
adumont / gist:dbc679320ca68f6c1a149c2f4fe9a439
Created July 7, 2019 11:33
TP-Link Cloud API subflow for HS100 in Node-Red
[
{
"id":"577621a6.54f19",
"type":"http request",
"z":"cc2c159c.fd5868",
"name":"login",
"method":"POST",
"ret":"obj",
"url":"https://wap.tplinkcloud.com",
"tls":"",
@adumont
adumont / fastai07-conda-spec-file.txt
Created May 30, 2019 09:53
Fast.AI 0.7 on win-64 with Conda & PIP
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: win-64
@EXPLICIT
https://repo.anaconda.com/pkgs/main/win-64/blas-1.0-mkl.tar.bz2
https://conda.anaconda.org/conda-forge/win-64/ca-certificates-2019.3.9-hecc5488_0.tar.bz2
https://repo.anaconda.com/pkgs/main/win-64/cudatoolkit-10.0.130-0.tar.bz2
https://repo.anaconda.com/pkgs/main/win-64/icc_rt-2019.0.0-h0cc432a_1.tar.bz2
https://repo.anaconda.com/pkgs/main/win-64/intel-openmp-2019.3-203.tar.bz2
https://repo.anaconda.com/pkgs/msys2/win-64/msys2-conda-epoch-20160418-1.tar.bz2
@adumont
adumont / newfile.v
Created December 30, 2018 16:02
newfile.v
`default_nettype none
`include "hvsync_generator.v"
module top(clk, reset, hsync, vsync, rgb);
input clk, reset;
output reg hsync, vsync;
output reg [2:0] rgb;
wire display_on;
wire [8:0] hpos;
@adumont
adumont / PlugStateTasker.md
Created August 29, 2017 12:40
Retrieve HS100 plug state in Tasker
Get Plug State (132)
	A1: Perform Task [ Name:Tp-link login Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:Off ] 
	A2: Variable Set [ Name:%deviceId To:XXXXXXXXXXXXXXXX Recurse Variables:Off Do Maths:Off Append:Off ] 
	A3: HTTP Post [ Server:Port:https://wap.tplinkcloud.com/ Path:/?token=%TOKEN Data / File:{
"method":"passthrough",
"params": {"deviceId": "%deviceId", "requestData": "{\"system\":{\"get_sysinfo\":null},\"emeter\":{\"get_realtime\":null}}"
 }
} Cookies: User Agent: Timeout:10 Content Type:text/plain Output File: Trust Any Certificate:Off ] 
	A4: JavaScriptlet [ Code:var data = JSON.parse(global("HTTPD"));
@adumont
adumont / URL-ScreenShots.ps1
Created January 3, 2017 17:22
Takes screenshot of multiple websites by URL
[Reflection.Assembly]::LoadWithPartialName("System.Drawing")
function Screenshot([Drawing.Rectangle]$bounds, $path) {
$bmp = New-Object Drawing.Bitmap $bounds.width, $bounds.height
$graphics = [Drawing.Graphics]::FromImage($bmp)
$graphics.CopyFromScreen($bounds.Location, [Drawing.Point]::Empty, $bounds.size)
$bmp.Save($path)
@adumont
adumont / List all Azure Virtual Networks.ps1
Created April 15, 2016 21:31
List all Azure Virtual Networks
$Results = @()
Get-AzureRmSubscription | ForEach-Object {
$Subscription = $_
Write-Host $Subscription.SubscriptionName
# We search all RM Virtual Networks
Select-AzureRmSubscription -SubscriptionName $Subscription.SubscriptionName | Out-Null
@adumont
adumont / .tmux.conf
Created March 2, 2016 00:08
.tmux.conf
set-option -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
unbind %
bind | split-window -h
bind – split-window -v
@adumont
adumont / p2d.sh
Last active September 11, 2015 11:40 — forked from tobert/p2d.sh
Physical-to-Docker conversion script ... as in, these are the steps I went through, but this script is not something you want to run on any machine you care about. I've removed employer-specific stuff from this copy.
#!/bin/bash
#
# This is really just notes, but I put them in a shell script so I get
# free highlighting and easy cut/paste (in and out).
#
echo "Don't run this script! It's meant to be read. It will destroy your system!"
exit 1
RAW="lucid-amd64-cdh3u4-raw"
@adumont
adumont / Online Security Measures.md
Last active August 29, 2015 14:18
Online Security Measures

Some measures to help you keep your precious accounts (and your data privacy) safe online

Suggestions are welcome to @adumont on Twitter, or via pull request here ;).

KeePass

Password Safe to keep all your online passwords

Store your KeePass db file it in your Dropbox. Also choose one file (from your Dropbox or better another cloud storage drive, like GDrive, or OneDrive, as your KeePass DB Key File.

@adumont
adumont / gapps-config.txt
Created February 24, 2015 17:35
gapps-config.txt for PA Full Google Apps
Books
Chrome
CloudPrint
Docs
Ears
Earth
NewsStand
NewsWidget
PlayGames
Sheets