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;
{
"font_face": "Fira Code",
"font_size": 13,
"theme": "Material-Theme-Darker.sublime-theme",
"color_scheme": "Monokai.sublime-color-scheme",
"always_show_minimap_viewport" : true,
"bold_folder_labels" : true,
"font_options" : ["gray_antialias", "subpixel_antialias"], // On retina Mac & Windows
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
@ZackStone
ZackStone / slack-invite-all-members-to-a-channel.js
Created April 14, 2017 13:48
Invite all team members to a Slack channel
/*
https://webapps.stackexchange.com/questions/100820/how-do-i-invite-all-team-members-to-a-new-slack-channel#answer-104062
Instructions: Just browse to the appropriate channel and paste
this script (below) into your Chrome/Firefox dev console and hit enter.
Then wait for the script to run until it completes.
It might take time as there is a limit to how many users may be invited at once.
The script will loop until all team members are invited.
*/
var foundAny=false;
function selectAllByLetter(remainingLetters) {