Skip to content

Instantly share code, notes, and snippets.

@CoolOppo
CoolOppo / CompileAndMinify.ps1
Created December 3, 2018 20:54
Fast, parallel, web build script. Written by me in PowerShell.
workflow compileAndMinify {
$jsFiles = Get-ChildItem -Recurse -Include *.js -Exclude *.min.js
parallel {
sequence {
$scssFiles = Get-ChildItem -Recurse -Include *.scss
ForEach -Parallel ($file in $scssFiles) {
$dir = (Get-Item $file).Directory.FullName
$cmd = ("sass """ + $($file.FullName) + """ """ + $dir + "\" + $file.BaseName + ".css""")
Invoke-Expression $cmd
}
// A port of Source Engine / Quake Movement to Unity
// Made by CoolOppo
using System;
using UnityEditor.ShaderGraph;
using UnityEngine;
using UnityStandardAssets.CrossPlatformInput;
using UnityStandardAssets.Utility;
using Random = UnityEngine.Random;
@CoolOppo
CoolOppo / .clang-format
Last active August 20, 2018 13:26
My clang-format style
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
@CoolOppo
CoolOppo / pyargs.md
Last active February 2, 2018 15:41 — forked from dideler/pyargs.md
Parsing Command-Line Argument in Python

Command-line arguments in Python show up in sys.argv as a list of strings (so you'll need to import the sys module).

For example, if you want to print all passed command-line arguments:

import sys
print(sys.argv)  # Note the first argument is always the script filename.

Command-line options are sometimes passed by position (e.g. myprogram foo bar) and sometimes by using a "-name value" pair (e.g. myprogram -a foo -b bar).

@CoolOppo
CoolOppo / bkr.sh
Created November 20, 2017 00:32
Background function to run any given command in the background and disown it from the shell, hiding ALL output:
bkr ()
{
(nohup "$@" &>/dev/null &)
}
[Gecko]
$Netplay Community Settings v2
*Boot to CSS, unlock everything, 4 stock 8 minute friendly fire on, trophy messages off,
*L+R+Start during stage load returns to CSS, name tags don't reset on close or exit,
*L-cancel % on results screen, normal C Stick functionality in 1P modes,
*Stage striking, A+B salty runback, unrestricted pause camera,
*Normal C Stick functionality in develop mode, debug menu access and set to English,
*leaving debug menu loads CSS, neutral spawn points,
*Increase input timing accuracy, press Y to toggle frozen stages
0445BF28 FFFFFFFF
@CoolOppo
CoolOppo / GALE01.ini
Last active June 2, 2016 17:32
Increase input timing accuracy in SSBM. Extracted from https://github.com/dolphin-emu/dolphin/pull/3876.
# GALE01 - Super Smash Bros. Melee
[Gecko]
$Increase input timing accuracy [Dan Salvato]
C21A4DA0 00000003
901C0000 3D808001
618C95FC 7D8903A6
4E800421 00000000
08402cc4 004e0400
# start X at login
if status --is-login
if test -z "$DISPLAY" -a $XDG_VTNR -eq 1
exec startx -- -keeptty
end
end
#!/bin/sh
# http://www.alfredklomp.com/programming/shrinkpdf
# Licensed under the 3-clause BSD license:
#
# Copyright (c) 2014, Alfred Klomp
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
Programming Language Checklist
by Colin McMillen, Jason Reed, and Elly Jones.
You appear to be advocating a new:
[ ] functional [ ] imperative [ ] object-oriented [ ] procedural [ ] stack-based
[ ] "multi-paradigm" [ ] lazy [ ] eager [ ] statically-typed [ ] dynamically-typed
[ ] pure [ ] impure [ ] non-hygienic [ ] visual [ ] beginner-friendly
[ ] non-programmer-friendly [ ] completely incomprehensible
programming language. Your language will not work. Here is why it will not work.