Skip to content

Instantly share code, notes, and snippets.

View ZackStone's full-sized avatar
⚠️
Loading...

Zack Stone ZackStone

⚠️
Loading...
View GitHub Profile
@echo off
start /B "" "code"
start /B "" "C:\src\...\...\.sln"
start /B "" "C:\src\...\...\.sln"
::start /B "" "C:\Program Files (x86)\Microsoft SQL Server Management Studio 19\Common7\IDE\Ssms.exe"
start /B "" "C:\Program Files (x86)\GitExtensions\GitExtensions.exe" "browse" "C:\src\...\...\"
start /B "" "services.msc"
exit
exit
@ZackStone
ZackStone / calc.js
Last active December 18, 2023 14:14
Calculadora - Só pode somar
var calc = {};
calc.somar = function (x,y) {
//console.log(`somando ${x} com ${y}`);
return x + y;
}
calc.multiplicar = function(x ,y) {
var resultado = 0;
param (
[int] $level
)
if ($level -eq 0) {
$level = $( Read-Host "Brightness level (0-100)" )
}
write-host "Brightness level: $level"
@ZackStone
ZackStone / Shortcuts.pub.ahk
Created September 28, 2021 11:11
Custom shortcuts using AutoHotKey
#NoEnv, #Persistent, #SingleInstance
; ======================================================================
; Winkey + J
; Script para alterar nivel de brilho da tela do notebook
#j::Run C:\manu\scripts\change-brightness-level.ps1
; ======================================================================
#Persistent
#InstallMouseHook
#InstallKeybdHook
while !(getKeyState("F1", "T"))
KeyHistory
return
esc::exitapp
; SOUNDCARD ANALYSIS
; Use the following script to discover your soundcard's capabilities (component types and control types).
; It displays the results in a simple ListView.
SetBatchLines -1
SplashTextOn,,, Gathering Soundcard Info...
; Most of the pure numbers below probably don't exist in any mixer, but they're queried for completeness.
; The numbers correspond to the following items (in order): CUSTOM, BOOLEANMETER, SIGNEDMETER, PEAKMETER,
; UNSIGNEDMETER, BOOLEAN, BUTTON, DECIBELS, SIGNED, UNSIGNED, PERCENT, SLIDER, FADER, SINGLESELECT, MUX,
@ZackStone
ZackStone / drop-all-tbls-sql-server.sql
Created June 22, 2021 14:12
Drop all tables in a SQL Server database
-- https://stackoverflow.com/questions/8439650/how-to-drop-all-tables-in-a-sql-server-database/20994549#20994549
EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
EXEC sp_msforeachtable 'DROP TABLE ?'
-- but second line you might need to execute more then once until you stop getting error.
@ZackStone
ZackStone / SQL_Murder_Mystery.sql
Created June 16, 2021 13:40
SQL Murder Mystery
-- https://mystery.knightlab.com/
--select * from get_fit_now_check_in where membership_id like '%48Z%' and check_in_date like '%0109'
--select * from get_fit_now_member where person_id = 16371
/*
select * from person p left join
drivers_license dl on dl.id = p.license_id left join
interview i on i.person_id = p.id left join
income on income.ssn = p.ssn
pactl set-source-mute 1 toggle
amixer get Capture | grep '\[off\]' && \
(notify-send -t 200 -a vim "MIC switched OFF" && paplay ~/Documents/Custom\ Scripts/mic-toggle/sfx-off.ogg) || \
(notify-send -t 200 -a vim "MIC switched ON" && paplay ~/Documents/Custom\ Scripts/mic-toggle/sfx-on.ogg)
SELECT SQL_CALC_FOUND_ROWS * FROM [...];
SELECT FOUND_ROWS();