Skip to content

Instantly share code, notes, and snippets.

View AScriver's full-sized avatar
🚩
Learning

Austin AScriver

🚩
Learning
View GitHub Profile
@krisbolton
krisbolton / fix-USB-showing-up-as-two-partitions.md
Last active June 1, 2024 13:38
How to fix a USB drive showing up as two drives (fragmented into multiple partitions) on Windows

How to fix a USB drive showing up as two drives (fragmented into multiple partitions) on Windows:

  1. Hold the Windows key and press X, select PowerShell (Admin), select Yes to the pop-up. You can also use Command Prompt.
  2. In the Powershell interface type diskpart to enter the disk partition tool.
  3. Type list disk to see all disks listed.
  4. Select the USB drive by typing select disk [NUMBER]. Be careful to select the correct drive.
  5. Type clean. An error will occur if you have the drive folder open, close the window and repeat the command if this happens.
  6. Type create partition primary.
  7. Type format fs=ntfs quick to format the drive (you can also choose to set fs=fat32).
  8. Type active.
@halkyon
halkyon / cleanup-win10.ps1
Last active April 28, 2024 16:40
Cleanup Windows 10 Powershell script
##
## Windows 10 cleanup script.
## Remove dodgy tracking settings, unneeded services, all apps, and optional features that come with Windows 10. Make it more like Windows 7.
## NOTE: this was tested on Creators Update (1703) and Fall Creators Update (1709). Some of this may not work as expected on newer versions.
##
## Instructions
## 1. Run this script (under Powershell as Administrator):
## powershell -ExectionPolicy Bypass .\cleanup-win10.ps1
## 2. Let it run through, you may see a few errors, this is normal
## 3. Reboot
@PurpleBooth
PurpleBooth / README-Template.md
Last active June 1, 2024 22:23
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@azborgonovo
azborgonovo / HtmlDecode.sql
Last active March 5, 2024 13:08
HtmlDecode in SQL
CREATE FUNCTION [dbo].[udf_HTMLDecode] (@text NVARCHAR(MAX))
RETURNS NVARCHAR(MAX) AS
BEGIN
DECLARE @vcResult NVARCHAR(MAX)
DECLARE @vcCrLf NVARCHAR(2)
DECLARE @siPos SMALLINT
DECLARE @vcEncoded NVARCHAR(7)
DECLARE @siChar SMALLINT
SET @vcCrLF = CHAR(13) + CHAR(10)
@danharper
danharper / background.js
Last active May 22, 2024 11:09
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});
@puleos
puleos / JSON-TSQL.sql
Created March 18, 2011 23:22
Json Parse Functions for MS SQL (by Phil Factor)
IF OBJECT_ID (N'dbo.parseJSON') IS NOT NULL
DROP FUNCTION dbo.parseJSON
GO
CREATE FUNCTION dbo.parseJSON( @JSON NVARCHAR(MAX))
RETURNS @hierarchy TABLE
(
element_id INT IDENTITY(1, 1) NOT NULL, /* internal surrogate primary key gives the order of parsing and the list order */
parent_ID INT,/* if the element has a parent then it is in this column. The document is the ultimate parent, so you can get the structure from recursing from the document */
Object_ID INT,/* each list or object has an object id. This ties all elements to a parent. Lists are treated as objects here */