Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View lgrangeia's full-sized avatar

Luis Grangeia lgrangeia

  • Lisbon, Portugal
View GitHub Profile
@lgrangeia
lgrangeia / auto_roll_up.js
Created July 14, 2023 21:25
Shelly 2PM Script to roll venetian blinds up on double tap to close
let double_click = false;
let last_close_ts = 0;
let double_tap_time = 3;
let roll_blades = false;
Shelly.addEventHandler(
function (event, ud) {
print("event: ", JSON.stringify(event));
@lgrangeia
lgrangeia / gist:3696de8363e2cbe6869871878ae00e30
Last active November 15, 2017 21:46
sharepoint endpoints
/_vti_bin/_vti_adm/admin.dll
/_vti_bin/_vti_aut/author.dll
/_vti_bin/shtml.dll
/_vti_bin/dspsts.asmx
/_vti_bin/alerts.asmx
/_vti_bin/forms.asmx
/_vti_bin/copy.asmx
/_vti_bin/people.asmx
/_vti_bin/versions.asmx
/_vti_bin/spsearch.asmx
@lgrangeia
lgrangeia / DataFactory.cs
Created November 15, 2017 14:44
hacmebank solve 1
public static int ValidateUserPassword(string loginID,string password)
{
// NEW code:
Global.createSqlServerConnection();
Global.globalSqlServerConnection.Open();
SqlCommand sqlcmd = new SqlCommand(null, Global.globalSqlServerConnection);
sqlcmd.CommandText = "select user_id from fsb_users where login_id=@loginid and password=@password";
SqlParameter sql_login = new SqlParameter("@loginid", System.Data.SqlDbType.NVarChar, 100);
SqlParameter sql_password = new SqlParameter("@password", System.Data.SqlDbType.NVarChar, 100);
sql_login.Value = loginID;

Keybase proof

I hereby claim:

  • I am lgrangeia on github.
  • I am lgrangeia (https://keybase.io/lgrangeia) on keybase.
  • I have a public key whose fingerprint is 344A 895B E24E 37E7 6C78 6007 C32C 332E 4C99 3A51

To claim this, I am signing this object: