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
miguelmota / remove_tuxera.sh
Last active Jun 15, 2019
Completely uninstall and remove Tuxera NTFS on MacOS (resets trial version)
View remove_tuxera.sh
sudo rm -rf /Applications/Tuxera\ Disk\ Manager.app
sudo rm -rf /Library/Application\ Support/Tuxera\ NTFS
sudo rm -rf /Library/Filesystems/fusefs_txantfs.fs
@miguelmota
miguelmota / scrape.py
Created Mar 23, 2017
Python Selenium get cookie value
View scrape.py
import time
from selenium import webdriver
driver = webdriver.Chrome('./chromedriver')
driver.get('https://ui.lkqd.com/login')
assert 'LKQD' in driver.title
time.sleep(2)
username_field = driver.find_element_by_name('username')
username_field.send_keys('myusername')
@miguelmota
miguelmota / IDEAS.md
Last active Jun 15, 2019
Random ideas of Miguel Mota
View IDEAS.md

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 https://github.com/miguelmota/streamhut
@miguelmota
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)
docker/registry/login:
$$(aws ecr get-login --no-include-email --region us-east-1 --profile=mycompany)
# Build docker target
docker/build:
docker build -f Dockerfile --no-cache -t mycompany/myapp .
# Tag docker image
docker/image/tag:
@miguelmota
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
google-chrome
@miguelmota
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 (
"bytes"
"fmt"
)
func main() {
b := make([]byte, 100)
b[0] = 'A'
@miguelmota
miguelmota / timezone.go
Created Jun 13, 2019
Golang set timezone for time example
View timezone.go
package main
import (
"fmt"
"time"
)
func main() {
loc, err := time.LoadLocation("America/Los_Angeles")
if err != nil {
@miguelmota
miguelmota / .env
Created Jun 12, 2019
Golang dotenv (.env) example
View .env
HOST=127.0.0.1
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
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.