Skip to content

Instantly share code, notes, and snippets.

View ryanknutson's full-sized avatar
🦐

Ryan Knutson ryanknutson

🦐
View GitHub Profile
@ryanknutson
ryanknutson / SassMeister-input-HTML.html
Created April 17, 2015 13:47
Generated by SassMeister.com.
<!doctype html>
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/applenavbar.css" />
@ryanknutson
ryanknutson / .vimrc
Last active May 19, 2017 15:10
My Vimrc and Zshrc
set ruler " show the ruler
set nocompatible " need this to do cool stuff
filetype plugin on " filetypes are used
syntax enable " enable syntax processing
set tabstop=4 " number of visual spaces per TAB
set softtabstop=4 " number of spaces in tab when editing
set expandtab " tabs are spaces
set showcmd " show command in bottom bar
set relativenumber " show relative line numbers
set number " show line numbers
@ryanknutson
ryanknutson / pi_compute.js
Created April 5, 2018 13:42
JavaScript to compute pi
var z = 1;
var sum = 0;
var neg = false;
// uses the Taylor series for arctan(1)
while (z < 100000000 ) {
if (neg == true) {
sum = sum - (Math.pow(1, z) / z);
z = z + 2;
neg = false;
@ryanknutson
ryanknutson / useful.js
Created September 10, 2019 17:16
Useful Javascript
// Create a range
[...Array(5).keys()];
// [0, 1, 2, 3, 4]
// Using let for block scope
var a = 'car';
{
let a = 5;
console.log(a) // 5
@ryanknutson
ryanknutson / cleanup-win10-gamer-edition.ps1
Last active February 12, 2021 05:55 — forked from halkyon/cleanup-win10.ps1
Cleanup Windows 10 Powershell script
##
## Windows 10 cleanup script (gamer edition)
## 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
@ryanknutson
ryanknutson / ffps3.sh
Created November 26, 2021 19:36
FFMPEG PS3 x264 AAC converter
#!/bin/bash
# this script transcodes video to x264 with aac audio
# and normalizes the volume. the resulting mp4 files
# are playable on many systems, including PS3 and macOS
# preview/quicktime
# usage
# ./ffps3.sh <input file>
ffmpeg -i "$1" -vcodec libx264 -level 41 -crf 24 -threads 0 -acodec aac -ab 128k -ac 2 -ar 48000 -af loudnorm=I=-16:LRA=11:TP=-1.5 "ps-$1".mp4