Skip to content

Instantly share code, notes, and snippets.

View feanor12's full-sized avatar

Michael Pusterhofer feanor12

  • Graz
View GitHub Profile
@feanor12
feanor12 / copy.cs
Last active August 24, 2023 21:44
multi target copy
using System.Threading.Channels;
Directory.CreateDirectory("tmp");
if (!File.Exists("tmp/source.a"))
{
var content = new byte[1024 * 1024 * 1024 + 10];
new Random().NextBytes(content);
File.WriteAllBytes("tmp/source.a", content);
}
### A Pluto.jl notebook ###
# v0.14.2
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local el = $(esc(element))
@feanor12
feanor12 / numerov.jl
Last active November 12, 2022 16:01
using UnicodePlots
using OrdinaryDiffEq
using Parameters
struct Numerov <: OrdinaryDiffEqAlgorithm end
mutable struct NumerovCache <: OrdinaryDiffEq.OrdinaryDiffEqMutableCache
uprev # last u value
g
gprev
@feanor12
feanor12 / script.js
Created April 5, 2017 12:09
LoL script for playonlinux5
include(["Functions", "QuickScript", "CustomInstallerScript"]);
include(["Functions", "Shortcuts","Wine"]);
include(["Functions", "Verbs", "sandbox"]);
include(["Functions", "Verbs", "d3dx9"]);
include(["Functions", "Verbs", "vcrun2015"]);
// Installs League of Legends and creates one shortcuts.
//
// Important:
// The BETA-Client has to be installed using the launcher.
diff --git a/lib/tasks/whitespace.rake b/lib/tasks/whitespace.rake
index c5b9d4c..b8a6ee3 100644
--- a/lib/tasks/whitespace.rake
+++ b/lib/tasks/whitespace.rake
@@ -1,15 +1,15 @@
namespace :whitespace do
desc 'Removes trailing whitespace'
task :cleanup do
- sh %{find . -name '*.rb' -exec sed -i '' 's/ *$//g' {} \\;}
+ sh %{find . -name '*.rb' -exec sed -i 's/ *$//g' {} \\;}