Skip to content

Instantly share code, notes, and snippets.

Avatar
🍑
Rapping freestyle

CoolOppo

🍑
Rapping freestyle
View GitHub Profile
View Simple NSIS Installer Script.nsi
; The name of the installer
Name "YOURPROGRAM"
; To change from default installer icon:
;Icon "YOURPROGRAM.ico"
; The setup filename
OutFile "YOURPROGRAM_Setup.exe"
; The default installation directory
@CoolOppo
CoolOppo / time-to-frequency.ipynb
Created Oct 19, 2019
How to extract frequencies with numpy using the real discrete fourier transform
View time-to-frequency.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@CoolOppo
CoolOppo / UE4-Cheatsheet.md
Created Apr 5, 2019
Markdown version of jbtronics' UE4 cheatsheet
View UE4-Cheatsheet.md
View rs-redirector.json
{
"createdBy": "Redirector v3.2.1",
"createdAt": "2019-03-26T16:13:16.006Z",
"redirects": [
{
"description": "Redirect to latest docs",
"exampleUrl": "https://docs.rs/amethyst_gltf/0.5.1/amethyst_gltf/struct.GltfPrefab.html",
"exampleResult": "https://docs.rs/amethyst_gltf/*/amethyst_gltf/struct.GltfPrefab.html",
"error": null,
"includePattern": "https://docs.rs/*/*/*",
@CoolOppo
CoolOppo / LICENSE
Created Mar 3, 2019
A C# Task pool I wrote that runs a maximum number of tasks concurrently equal to ProcessorCount. Usage: Task.Run() => TaskMan.Run()
View LICENSE
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@CoolOppo
CoolOppo / clamp.rs
Created Feb 8, 2019
Rust clamp function for most types
View clamp.rs
trait Clamp<T> {
fn clamp(self, min: T, max: T) -> T;
}
impl<T> Clamp<T> for T
where
T: PartialOrd + Copy,
{
fn clamp(self, min: T, max: T) -> T {
if self > max {
@CoolOppo
CoolOppo / Cargo.toml
Last active Feb 24, 2021
How to compile to a DLL in rust while using it as a normal rust library
View Cargo.toml
[package]
name = "test"
version = "0.1.0"
authors = ["YOU <YOU@users.noreply.github.com>"]
edition = "2018"
[lib]
crate-type = ["cdylib"]
@CoolOppo
CoolOppo / LICENSE.txt
Last active Dec 29, 2018
Web development Makefile to compile SASS (SCSS) files to CSS, minify all CSS with csso, and minify all JS with terser.
View LICENSE.txt
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@CoolOppo
CoolOppo / settings.json
Last active Dec 14, 2018
My VS Code settings
View settings.json
{
"C_Cpp.clang_format_style": "file",
"C_Cpp.default.cStandard": "c11",
"C_Cpp.default.cppStandard": "c++17",
"bracket-pair-colorizer-2.highlightActiveScope": true,
"bracket-pair-colorizer-2.showBracketsInGutter": true,
"bracket-pair-colorizer-2.showHorizontalScopeLine": false,
"breadcrumbs.enabled": true,
"editor.dragAndDrop": false,
"editor.find.autoFindInSelection": true,
@CoolOppo
CoolOppo / CompileAndMinify.ps1
Created Dec 3, 2018
Fast, parallel, web build script. Written by me in PowerShell.
View CompileAndMinify.ps1
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
}