Skip to content

Instantly share code, notes, and snippets.

View KingGeneral's full-sized avatar
Studying

Anthony Kal KingGeneral

Studying
View GitHub Profile
@KingGeneral
KingGeneral / RestartAudioServices.bat
Created April 9, 2023 07:10
Fix Lenovo Popping Sound for New Lenovo Legion 2023 release
@echo off
:: BatchGotAdmin
:-------------------------------------
Rem --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
Rem --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
@KingGeneral
KingGeneral / paranoia-config.php
Created November 6, 2018 08:56 — forked from franz-josef-kaiser/paranoia-config.php
WordPress debug - Error Reporting Level: Paranoia
<?php
define( 'DS', DIRECTORY_SEPARATOR );
# ==================================
# PHP errors & log
error_reporting(
E_ALL | E_STRICT | E_CORE_ERROR | E_CORE_WARNING
| E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE
| E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR
);
# OR: shorter and all together
@KingGeneral
KingGeneral / gist:e151ead7c8b42fde408201c8c0bd62a3
Created March 3, 2018 13:51 — forked from bryhal/gist:4129042
MYSQL: Generate Calendar Table
DROP TABLE IF EXISTS time_dimension;
CREATE TABLE time_dimension (
id INTEGER PRIMARY KEY, -- year*10000+month*100+day
db_date DATE NOT NULL,
year INTEGER NOT NULL,
month INTEGER NOT NULL, -- 1 to 12
day INTEGER NOT NULL, -- 1 to 31
quarter INTEGER NOT NULL, -- 1 to 4
week INTEGER NOT NULL, -- 1 to 52/53
day_name VARCHAR(9) NOT NULL, -- 'Monday', 'Tuesday'...
@KingGeneral
KingGeneral / The Technical Interview Cheat Sheet.md
Created January 26, 2017 09:41 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.