This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UnitElectricEnergyEfficiency.swift | |
// | |
// Created by Sören Gade on 13.12.21. | |
// Copyright © 2021 Sören Gade. All rights reserved. | |
// | |
import Foundation | |
/// A unit of measure for electric energy efficiency. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add your text blocks here | |
// values are added based on their sorted keys | |
let valueRepresentations = [ | |
3: "Fizz", | |
5: "Buzz" | |
] | |
let sortedKeys = valueRepresentations.keys.sorted() | |
func representation(of value: Int) -> String { | |
var output = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sg-magic.zsh-theme | |
# Based on af-magic.zsh-theme from https://github.com/andyfleming/oh-my-zsh/blob/master/themes/af-magic.zsh-theme. | |
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi | |
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" | |
# primary prompt | |
PROMPT='$FG[032]%~\ | |
$(git_prompt_info) \ | |
$FG[105]%(!.#.»)%{$reset_color%} ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2016 Sören Gade | |
package main | |
import ( | |
"bufio" | |
"fmt" | |
"math/rand" | |
"os" | |
"time" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"math/big" | |
"os" | |
"strconv" | |
"strings" | |
"time" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io" | |
"net" | |
"time" | |
) | |
const ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"net/http" | |
"sync" | |
"time" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
var cache map[int64]int64 = make(map[int64]int64) | |
func fib_useCache() bool { | |
return true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* A very fast and quick download/upload graph for your fritz.box. | |
* This is not optimized. | |
* | |
* Dependencies: | |
* - andrewjstone/cli-chart @ ~0.3.1 | |
* - sgade/router-upnp @ ~0.2.0 | |
* | |
* */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Workflow.js | |
* by: Sören Gade | |
* | |
* Extracts information from Workflow's share URLs. | |
* | |
* For more information, see their website: https://my.workflow.is/. | |
*/ | |
var http = require('http'), |
NewerOlder