Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View sebug's full-sized avatar
🐒
trying to code his way out of it

Sebastian Gfeller sebug

🐒
trying to code his way out of it
View GitHub Profile
@sebug
sebug / SmartArt.purs
Created July 8, 2016 18:07
Canvas schematic arrows
module SmartArt where
import Prelude (bind, ($), (+), (*), (-), (/), pure)
import Control.Monad.Eff (Eff)
import Graphics.Canvas (CANVAS, fillPath, setFillStyle, moveTo, lineTo, fillText, setFont, measureText, Context2D)
import Data.List (List(..))
drawArrows :: forall eff. Context2D -> Number -> Number -> Number -> List String -> Eff (canvas :: CANVAS | eff) Number
drawArrows ctx dx x y Nil = pure x
drawArrows ctx dx x y (Cons l ls) = do
$AppliedGPOs = $(Get-WmiObject -Namespace 'ROOT\RSOP\Computer' -Class RSOP_GPLink -Filter "AppliedOrder <> 0" | Select @{n='GPO';e={$_.GPO.Replace("RSOP_GPO.","")}} | Select -ExpandProperty GPO)
Get-WmiObject -Namespace 'ROOT\RSOP\Computer' -Class 'RSOP_GPO' -Filter $AppliedGPOs[0]
import Foundation
struct APIService {
let baseUrl = "redacted"
let applicationId = "redacted"
let eventCode = "redacted"
let token: String?
func login(c: Credentials, andThen: APIService -> ()) -> () {
@sebug
sebug / gist:ddd82f3a14d152404c46
Created May 11, 2015 19:14
Base 64 streamed in C#
using System;
using System.IO;
using System.Collections.Generic;
using System.Security.Cryptography;
namespace Base64
{
public class Base64Stream
{
public static int Main(string[] args)
@sebug
sebug / Main
Created March 1, 2015 13:41 — forked from anonymous/Main
module Main where
import Debug.Trace
import Network.XHR
import qualified Thermite as T
import qualified Thermite.Html as T
import qualified Thermite.Html.Elements as T
import qualified Thermite.Action as T
import qualified Thermite.Types as T