Skip to content

Instantly share code, notes, and snippets.

View juanjol's full-sized avatar
🌈
Researching

Juanjo juanjol

🌈
Researching
  • Metadrop
  • España
  • 00:11 (UTC +02:00)
  • LinkedIn in/juanjol
View GitHub Profile
@juanjol
juanjol / hotspot-keep-alive.ps1
Created April 11, 2024 15:17 — forked from primaryobjects/hotspot-keep-alive.ps1
Script to Enable Windows 10 Mobile Hotspot Automatically After Reboot
# https://superuser.com/a/1434648
Add-Type -AssemblyName System.Runtime.WindowsRuntime
$asTaskGeneric = ([System.WindowsRuntimeSystemExtensions].GetMethods() | ? { $_.Name -eq 'AsTask' -and $_.GetParameters().Count -eq 1 -and $_.GetParameters()[0].ParameterType.Name -eq 'IAsyncOperation`1' })[0]
Function Await($WinRtTask, $ResultType) {
$asTask = $asTaskGeneric.MakeGenericMethod($ResultType)
$netTask = $asTask.Invoke($null, @($WinRtTask))
$netTask.Wait(-1) | Out-Null
$netTask.Result
@juanjol
juanjol / netextender
Created November 18, 2020 08:36
upstart init.d script for running Dell SonicWALL NetExtender as a service. Script should be in /etc/init.d/netextender Configuration goes in /etc/default/netextender Than run: sudo update-rc.d netextender defaults
#!/bin/sh
# defaults for NetExtender Dell VPN Client
# sourced by /etc/init.d/netextender
# should be placed in /etc/default/netextender
# Enable or disable the daemon
ENABLE_DAEMON=1
# Path to daemon
DAEMON=/usr/sbin/netExtender
@juanjol
juanjol / amazon-rekognition.md
Created June 27, 2019 11:38 — forked from alexcasalboni/amazon-rekognition.md
Amazon Rekognition - Python Code Samples

Amazon Rekognition - Python Code Samples

  1. Labels Detection
  2. Faces Detection
  3. Faces Comparison
  4. Faces Indexing
  5. Faces Search
@juanjol
juanjol / 00 - Start Gcode
Last active March 18, 2020 22:27
Configuración autolevel para hephestos
; -- START GCODE --
G21 ;set units to millimetres
G90 ;set to absolute positioning
M106 S0 ;set fan speed to zero (turned off)
G28 ;(Home)
G29 A ;Activate UBL
G29 L0 ;Load UBL mesh from slot 0
G29 J ;tilt mesh based in three points
G1 Z7.0 F1200 ;move Z to position 10.0 mm
G92 E0 ;zero the extruded length
@juanjol
juanjol / Dockerfile
Last active August 18, 2016 12:50 — forked from lukaszraczylo/delete-hipchat-history.rb
Delete hipchat 1:1 history (08/2016 Working)
FROM ruby:2.1-onbuild
CMD ["./delete-hipchat-history.rb"]
@juanjol
juanjol / docker-compose.yml
Created May 23, 2016 11:38
Behat - primera aproximación con docker compose
behat:
image: qualiboo/testing-behat
volumes:
- ./behat:/var/work
links:
- hub
environment:
website: http://localhost
hub:
image: qualiboo/testing-hub
@juanjol
juanjol / .zshrc
Created March 24, 2016 23:44
my ZSH config (oh-my-zsh dependency)
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="agnoster"
# Uncomment the following line to use case-sensitive completion.
@juanjol
juanjol / init.lua
Created December 6, 2015 22:09 — forked from jimoconnell/init.lua
Code by HoracioBouzas, formatted for use with ESPlorer
--http://www.instructables.com/id/ESP8266-based-web-configurable-wifi-general-purpos-1/
--Code by HoracioBouzas, formatted for use with ESPlorer by jimoconnell
print("WIFI control");
-- put module in AP mode
wifi.setmode(wifi.SOFTAP);
print("ESP8266 mode is: " .. wifi.getmode());
cfg={};
-- Set the SSID of the module in AP mode and access password
cfg.ssid="ESP8266";
cfg.pwd="passwordpassword";
/**
* @author Mike Almond - @mikedotalmond
*
* Example sketch for working with the HC-SR04 Ultrasound distance sensor
* http://users.ece.utexas.edu/~valvano/Datasheets/HCSR04b.pdf
*
* Uses a hardware interrupt to monitor the echo pin and measure the pulse length (without pausing code execution like you would when using Arduino::pulseIn())
* https://github.com/mikedotalmond/arduino-pulseInWithoutDelay
* PulseInZero uses interrupt 0 ( pin 2 on arduino uno)
* PulseInOne uses interrupt 1 ( pin 3 on an arduino uno)
@juanjol
juanjol / Vagrant.rb
Last active August 29, 2015 13:57
Configuración de ejemplo básica para Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.