Skip to content

Instantly share code, notes, and snippets.

View johansson's full-sized avatar

Will Johansson johansson

View GitHub Profile
/*
* Copyright (C) 2020 by Will Johansson
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL,
* DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
* USE OR PERFORMANCE OF THIS SOFTWARE.
#!/usr/bin/env runhaskell
import System.Process (callCommand)
runcmd args =
putStrLn ("+ " ++ cmd) >> callCommand cmd
where cmd = unwords args
-- (Name of your laptop's internal display, x res, y res)
(internalOutput, intX, intY) = ("eDP1", 3840, 2160)
@johansson
johansson / minimum.ks
Last active November 7, 2015 21:57
minimum fedora 23 kickstart
lang en_US.UTF-8
keyboard us
timezone US/Pacific
auth --useshadow --enablemd5
selinux --enforcing
firewall --enabled
autopart
repo --name=fedora --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-23&arch=$basearch
repo --name=fedora-updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f23&arch=$basearch

Keybase proof

I hereby claim:

  • I am johansson on github.
  • I am johansson (https://keybase.io/johansson) on keybase.
  • I have a public key whose fingerprint is EE3D 2C81 8523 7D69 531C 0294 72E2 E620 03EA 77A7

To claim this, I am signing this object:

@johansson
johansson / FixStartMenu.ps1
Created March 24, 2015 08:37
Fix Start Menu in 10041
Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
using System;
using ReactiveUI;
using System.Windows.Input;
using System.Threading;
using System.Threading.Tasks;
namespace RxUITestApp
{
public class MainVM : ReactiveObject
{
@johansson
johansson / gist:5251234
Created March 27, 2013 02:58
FizzBuzz using the PatternMatching's Fluent API.
foreach (var i in Enumerable.Range(1, 100))
i.With(x => x % 3 == 0).Do(_ => Console.WriteLine("Fizz"))
.With(x => x % 5 == 0).Do(_ => Console.WriteLine("Buzz"))
.With(x => x % 3 != 0 && x % 5 != 0).Do(Console.WriteLine);