Skip to content

Instantly share code, notes, and snippets.

View perjerz's full-sized avatar
🏠
Working from home

Siwat Kaolueng perjerz

🏠
Working from home
View GitHub Profile
@perjerz
perjerz / PowerShell Customization.md
Created May 27, 2020 12:07 — forked from jchandra74/PowerShell Customization.md
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.

@perjerz
perjerz / factorial.hs
Created September 15, 2019 05:06
Ajarn dave
factorial :: Int -> Int
factorial 0 = 1
factorial n = n * factorial (n - 1)
@perjerz
perjerz / fibonacci.hs
Created September 15, 2019 05:05
ajarn dave haskell
fibonacci :: Int -> Int
fibonacci 0 = 1
fibonacci 1 = 1
fibonacci n = fibonacci(n-2) + fibonacci(n-1)
@perjerz
perjerz / main.hs
Last active September 14, 2019 10:19
Mathematics for Programmers Exercises by Ajarn Dave
Prelude> countWords s = length(Data.List.nub(words s))
Prelude> countWords "This is a cat this is a rat"
6
isPalindrome a = a == reverse a
isPalindrome "2"
Prelude> isPalindrome "233"
False
@perjerz
perjerz / table-of-contents.md
Created September 2, 2019 08:09 — forked from isaacplmann/table-of-contents.md
Advanced Angular Patterns
@perjerz
perjerz / mockup
Created October 26, 2018 16:58
library_room_booking_mock_up
-----------------------------------------------
| |
| Library Room Booking |
| |
| (Logo) |
| |
| |
| Student ID: OOOOOOOO |
| |
| Password: OOOOOOOO |
@perjerz
perjerz / card_at.go
Created October 26, 2018 14:16
YWC question
package cardat
import (
"fmt"
)
func cardAt(n int) string {
if n < 0 || n > 51 {
return "Out of range"
}
<!--
@license
Copyright 2018 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@perjerz
perjerz / main.go
Last active June 9, 2018 07:38
UltimateGo
package main
import "fmt"
type user struct {
name string
email string
}
func main() {
@perjerz
perjerz / cart.interfaces.ts
Last active June 8, 2018 16:47
NgRx State
export interface Item {
id: string;
name: string;
type: string;
price: string;
description: string;
}
export interface Cart {
// Define state here