Skip to content

Instantly share code, notes, and snippets.

View TiagoDGomes's full-sized avatar

Tiago Gomes TiagoDGomes

  • Instituto Federal de São Paulo
  • Brazil
View GitHub Profile
@TiagoDGomes
TiagoDGomes / virtualenv.reg
Last active August 14, 2021 15:34
Windows 10: Right click > Create virtualenv (.venv) - Python 3
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\virtualenv3]
@="Virtualenv (.venv) - Python 3"
"Icon"="%LOCALAPPDATA%\\Microsoft\\WindowsApps\\python.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\virtualenv3\command]
;@="cmd /k \"\"%%ProgramFiles(x86)%%\\Python36-32\\Scripts\\virtualenv.exe\"\" .env & cd .env & scripts\\activate"
@="cmd /k \"\"%%LOCALAPPDATA%%\\Microsoft\\WindowsApps\\python.exe\"\" -m venv .venv & cd .venv & scripts\\activate"
// ==UserScript==
// @id iitc-plugin-s2region-select@jonatkins
// @name IITC plugin: Show S2 cells with a select to change the levels
// @updateURL https://gist.githubusercontent.com/TiagoDGomes/d897eba1f57c866de417ca213dce5e3d/raw/b750f8710ef7109bdecb55fc0de325f3b530f36a/s2region-select.js
// @downloadURL https://gist.githubusercontent.com/TiagoDGomes/d897eba1f57c866de417ca213dce5e3d/raw/b750f8710ef7109bdecb55fc0de325f3b530f36a/s2region-select.js
// @category Layer
// @version 0.1.2.20170108.21732
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @description [iitc-2018-01-11-010201] Show the S2 cells with a select drop-down.
// @include https://*.ingress.com/intel*
def choose_option(num):
def case1():
return "Option 1"
def case2():
return "Option 2"
def case3():
return "Option 3"
options = {
@TiagoDGomes
TiagoDGomes / conexao.php
Created April 12, 2019 14:42
Vanessa: conexao.php
<?php
$servername = "localhost";
$username = "usuario";
$password = "ifsuldeminas";
$dbname = "esp32";
$conn = new mysqli($servername, $username, $password, $dbname);
if(mysqli_connect_error()){
die("Erro na conexão com o banco de dados.");
}
'https://gallery.technet.microsoft.com/scriptcenter/Windows-Update-Utility-WUU-1d72e520
Set wshShell = CreateObject("WScript.Shell")
currentBuild = wshShell.RegRead( "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentBuild")
if (currentBuild < 17763) Then
MsgBox("Desatualizado")
else
MsgBox("Atualizado")
end if
@TiagoDGomes
TiagoDGomes / serial.vbs
Created April 24, 2019 02:02
Get Windows license key
MsgBox WindowsKey
Function WindowsKey()
Set WshShell = CreateObject("WScript.Shell")
Key = WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId")
Const KeyOffset = 52
i = 28
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
@TiagoDGomes
TiagoDGomes / instituto-federal.svg
Created April 28, 2019 14:52
Logo do Instituto Federal vetorizado
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@TiagoDGomes
TiagoDGomes / suapplus.user.js
Last active April 28, 2019 21:25
Script para funcionalidades adicionais ao SUAP IFSP
// ==UserScript==
// @name SUAP Plus
// @namespace https://gist.github.com/TiagoDGomes/bd91143d7d9daaed7b52ab831f042076
// @version 0.1
// @description Liberte o SUAP
// @author Tiago Gomes
// @match *://suap.ifsp.edu.br/*
// @grant none
// @updateURL https://gist.github.com/TiagoDGomes/bd91143d7d9daaed7b52ab831f042076
// @downloadURL https://gist.github.com/TiagoDGomes/bd91143d7d9daaed7b52ab831f042076
@TiagoDGomes
TiagoDGomes / photo_viewer.reg
Created May 2, 2019 02:47
Windows Photo Viewer Classic
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open]
"MuiVerb"="@photoviewer.dll,-3043"
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\ 00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,72,00,75,00,\ 6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,\ 00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,\ 25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,20,00,50,00,68,00,6f,\ 00,74,00,6f,00,20,00,56,00,69,00,65,00,77,00,65,00,72,00,5c,00,50,00,68,00,\ 6f,00,74,00,6f,00,56,00,69,00,65,00,77,00,65,00,72,00,2e,00,64,00,6c,00,6c,\ 00,22,00,2c,00,20,00,49,00,6d,00,61,00,67,00,65,00,56,00,69,00,65,00,77,00,\ 5f,00,46,00,75,00,6c,00,6c,00,73,00,63,00,72,00,65,00,65,00,6e,00,20,00,25,\ 00,31,00,00,00
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open\DropTarget]
@TiagoDGomes
TiagoDGomes / nethood.vbs
Last active June 22, 2020 02:13
Add Network Location Command Line
Set WshShell = CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")
If WScript.Arguments.Count <= 1 then
Wscript.Echo "Use: " + vbcrlf + vbtab + Wscript.ScriptName + " nethood_name dest_path [icon]"
Wscript.Quit()
End If
nethood_name = WScript.Arguments(0)
dest_path = WScript.Arguments(1)