Skip to content

Instantly share code, notes, and snippets.

keyboard shredding

Miguel Mota miguelmota

keyboard shredding
Block or report user

Report or block miguelmota

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
miguelmota /
Last active Jun 15, 2019
Completely uninstall and remove Tuxera NTFS on MacOS (resets trial version)
sudo rm -rf /Applications/Tuxera\ Disk\
sudo rm -rf /Library/Application\ Support/Tuxera\ NTFS
sudo rm -rf /Library/Filesystems/fusefs_txantfs.fs
miguelmota /
Created Mar 23, 2017
Python Selenium get cookie value
import time
from selenium import webdriver
driver = webdriver.Chrome('./chromedriver')
assert 'LKQD' in driver.title
username_field = driver.find_element_by_name('username')
miguelmota /
Last active Jun 15, 2019
Random ideas of Miguel Mota

List of random ideas I have (in no particular order)

  • ssh to website content (in devtools?)
  • map showing all IPFS nodes
  • handgesture drawing with friends web app where users draw by moving their finger (webcam motion detection)
  • vimwiki web ui + secure site to view over dropbox sync
  • hello world ethereum + state channels lightbike game
  • hi-tech ping pong paddle where the ball is conductive and paddle is using conductive paint to determine position of pall on paddle when hit
  • gist powered blog where gists are fetched by cron job and generated to static html files
  • stream data from terminal to browser and vice versa
miguelmota / Makefile
Last active Jun 14, 2019
Makefile docker push to Elastic Container Registry (ECR)
View Makefile
# Login to AWS registry (must have docker running)
$$(aws ecr get-login --no-include-email --region us-east-1 --profile=mycompany)
# Build docker target
docker build -f Dockerfile --no-cache -t mycompany/myapp .
# Tag docker image
miguelmota / chrome_install
Created Dec 27, 2015
Install Google Chrome in Kali Linux
View chrome_install
dpkg -i google-chrome-stable_current_amd64.deb
apt-get install libappindicator1
apt-get -f install
xhost +
adduser bob
su - bob
miguelmota / trim_bytes_slice.go
Created May 28, 2019
Golang trim control characters (NULL) from bytes slice
View trim_bytes_slice.go
package main
import (
func main() {
b := make([]byte, 100)
b[0] = 'A'
miguelmota / timezone.go
Created Jun 13, 2019
Golang set timezone for time example
View timezone.go
package main
import (
func main() {
loc, err := time.LoadLocation("America/Los_Angeles")
if err != nil {
miguelmota / .env
Created Jun 12, 2019
Golang dotenv (.env) example
View .env
View getusermedia.html
<!-- Video element (live stream) -->
<label>Video Stream</label>
<video autoplay id="video" width="640" height="480"></video>
<!-- Canvas element (screenshot) -->
<label>Screenshot (base 64 dataURL)</label>
<canvas id="canvas" width="640" height="480"></canvas>
<!-- Capture button -->
<button id="capture-btn">Capture!</button>
miguelmota / getdates.js
Last active Jun 12, 2019
Get dates in between two dates with JavaScript.
View getdates.js
// Returns an array of dates between the two dates
var getDates = function(startDate, endDate) {
var dates = [],
currentDate = startDate,
addDays = function(days) {
var date = new Date(this.valueOf());
date.setDate(date.getDate() + days);
return date;
while (currentDate <= endDate) {
You can’t perform that action at this time.