Skip to content

Instantly share code, notes, and snippets.

Avatar

Abbas Tolgay Yılmaz streamerd

View GitHub Profile
View gist:3cb7160eac3cf5ea1ac40546cb50fd90
mutation{
registerUser (
input: {
username: "streamerd",
email: "abcd@e.fu",
password: "123456789-qwert-y0",
role: "user",
behaviours: ["audience", "artist", "volunteer"]
city: "Hamburg",
@streamerd
streamerd / Project.hs
Created Mar 7, 2018
source file: Project.hs
View Project.hs
{- # LANGUAGE GeneralizedNewtypeDeriving #-}
module Project where
import Data.Text (Text)
newtype Money = Money
{ unMoney :: Double
} deriving (Show, Eq, Num)
@streamerd
streamerd / error log
Created Mar 7, 2018
stack build throwing error for type: 'Money', No instance for (Eq Money)
View error log
/Users/streamerd/Developer/hs/haskellAtWork/projectz/Project.hs:28:21: error:
• No instance for (Eq Money)
arising from the first field of ‘Sale’ (type ‘Money’)
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
• When deriving the instance for (Eq Transaction)
|
28 | deriving (Show, Eq)
| ^^
@streamerd
streamerd / Main.java
Created Apr 3, 2017
SocketCastify created by streamerd - https://repl.it/Grjk/3
View Main.java
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws InterruptedException, IOException {
File file = new File("nodeIpAddresses");