Skip to content

Instantly share code, notes, and snippets.

@Rdp3389
Rdp3389 / pwgen-bios-with-i.py
Created January 19, 2020 10:50
generate result for HP serial with "i" error code
print("============================ Insyde H2O BIOS 'i'/'I' error-code ============================")
print("= Insyde H2O BIOS (Acer, HP) System Disabled 'i'/'I' error-code response generator.")
print("= this script meant to solve https://github.com/bacher09/pwgen-for-bios/issues/52 in Python 3")
print("= ")
print("= HP official response to BIOS Password reset: https://support.hp.com/us-en/document/c06368824")
print("============ Start Quote ============")
print("= A forgotten BIOS password cannot be reset by HP. HP is committed to the security and privacy of")
print("= our customers. To resolve a forgotten BIOS password issue, a system board replacement is required,")
print("= and additional customer costs apply. For more information, go to HP Worldwide Limited Warranty and Technical Support.")
print("= https://www8.hp.com/us/en/privacy/limited_warranty.html")
@atao
atao / RunAsAdmin.ps1
Last active October 1, 2023 19:34
🕵️ Self privileges escalation with PowerShell.
#Requires -RunAsAdministrator
#OneLine
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit }
#Or
$Loc = Get-Location
"Security.Principal.Windows" | % { IEX "( [ $_`Principal ] [$_`Identity ]::GetCurrent() ).IsInRole( 'Administrator' )" } | ? {
$True | % { $Arguments = @('-NoProfile','-ExecutionPolicy Bypass','-NoExit','-File',"`"$($MyInvocation.MyCommand.Path)`"","\`"$Loc\`"");
Start-Process -FilePath PowerShell.exe -Verb RunAs -ArgumentList $Arguments; } }
@Manouchehri
Manouchehri / rfc3161.txt
Last active April 6, 2024 16:22
List of free rfc3161 servers.
https://rfc3161.ai.moda
https://rfc3161.ai.moda/adobe
https://rfc3161.ai.moda/microsoft
https://rfc3161.ai.moda/apple
https://rfc3161.ai.moda/any
http://rfc3161.ai.moda
http://timestamp.digicert.com
http://timestamp.globalsign.com/tsa/r6advanced1
http://rfc3161timestamp.globalsign.com/advanced
http://timestamp.sectigo.com
@rosberglinhares
rosberglinhares / ChangeAssemblyVersion.ps1
Created May 12, 2016 03:38
Powershell script to change assembly and file version
Param (
[Parameter(Mandatory=$true)]
[string[]] $AssemblyInfoFilesPath,
[Parameter(Mandatory=$true)]
[Version] $Version
)
$ErrorActionPreference = 'Stop' # Stops executing on error instead of silent continue.
Set-StrictMode -Version Latest # Enforces coding rules in expressions, scripts, and script blocks. Uninitialized variables are not permitted.
@smoothdeveloper
smoothdeveloper / generate_add_and_drop_all_constraints.sql
Created February 27, 2015 13:22
SqlServer: Generate alter add / drop for all type of constraints (foreign key, unique and check)
with
unique_constraint_infos (schemaname, tablename, constraintname, columnname)
as (
select
quotename(tc.table_schema)
, quotename(tc.table_name)
, quotename(tc.constraint_name)
, quotename(cc.column_name)
from
information_schema.table_constraints tc
@sharkoz
sharkoz / import.sql
Last active December 30, 2015 22:29 — forked from mheadd/dartfirststate_de_us.sql
Import données GTFS (des transiliens SNCF) en base de données MySQL
-- -------------------------------------------------------------------------------------------------------
-- A SQL script for importing GFTS data from the State of Delaware into a MySQL database.
--
-- Copyright 2010 Mark J. Headd
-- http://www.voiceingov.org
--
-- This file is free software; you can redistribute it and/or modify it under the terms of the
-- GNU Library General Public License as published by the Free Software Foundation; either version 2 of the
-- License, or (at your option) any later version.
-- This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
@willurd
willurd / web-servers.md
Last active April 26, 2024 12:46
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@johncasimiro
johncasimiro / Mimic SQL select * statement in SOQL using Apex
Created December 9, 2010 06:57
A code snippet that mimics the popular Select * SQL syntax in force.com's Apex language.
/*
* @description: A code snippet that mimics the popular Select * SQL syntax in force.com's Apex language.
*/
// Initialize setup variables
String objectName = 'Contact'; // modify as needed
String query = 'SELECT';
Map<String, Schema.SObjectField> objectFields = Schema.getGlobalDescribe().get(objectName).getDescribe().fields.getMap();
// Grab the fields from the describe method and append them to the queryString one by one.
@mheadd
mheadd / dartfirststate_de_us.sql
Created October 7, 2010 17:13
A SQL script for importing GFTS data from the State of Delaware into a MySQL database.
-- -------------------------------------------------------------------------------------------------------
-- A SQL script for importing GFTS data from the State of Delaware into a MySQL database.
--
-- Copyright 2010 Mark J. Headd
-- http://www.voiceingov.org
--
-- This file is free software; you can redistribute it and/or modify it under the terms of the
-- GNU Library General Public License as published by the Free Software Foundation; either version 2 of the
-- License, or (at your option) any later version.
-- This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;