Skip to content

Instantly share code, notes, and snippets.

View frectonz's full-sized avatar
❄️

Fraol Lemecha frectonz

❄️
View GitHub Profile
{ pkgs ? import <nixpkgs> { } }:
pkgs.mkShell {
packages = [
pkgs.elixir
pkgs.exercism
pkgs.elixir-ls
] ++
# Linux only
pkgs.lib.optionals pkgs.stdenv.isLinux [

Comments on The Ethiopian Startup Proclamation

Generally, I think the document is very well-prepared and addresses most of the important problems that startups face in their early stages.


1. On the Annual Competition

image

use calculator::Calculator;
use clap::Parser;
use db::InMemory;
use futures::{future::poll_fn, SinkExt, StreamExt};
use tokio::{
net::{TcpListener, TcpStream},
sync::mpsc,
};
use tokio_stream::wrappers::UnboundedReceiverStream;
use tokio_tungstenite::tungstenite::Message as WsMessage;
{
"data": {
"completeSubmissionProcessing": {
"success": false,
"error_message": "exception {'message': \"field '_set' not found in type: 'Submission_set_input'\", 'extensions': {'path': '$.selectionSet.update_Submission_by_pk.args._set._set', 'code': 'validation-failed'}} when making gql query\nmutation CompleteClientSubmissionProcessing($id: Int!, $set: Submission_set_input!) {\n update_Submission_by_pk(pk_columns: {id: $id}, _set: $set) {\n id\n sg_playlist_id\n status\n error_message\n SubmissionRows {\n id\n error_message\n sg_version_id\n status\n SubmissionRowFiles {\n id\n error_message\n sg_published_file_id\n status\n SubmissionRowFileLocations {\n id\n error_
import System.Random
import Data.String
record Game where
constructor MkGame
answer : Nat
tries : Nat
Show Game where
show (MkGame answer tries) = "Game (answer = \{show answer}, tries = \{show tries})"
package env
import (
"fmt"
"net"
"os"
"reflect"
"strconv"
"strings"
async function getPublicIP(): Promise<string | null> {
return new Promise((resolve) => {
const pc = new RTCPeerConnection({ iceServers: [{ urls: "stun:stun.l.google.com:19302" }] });
pc.createDataChannel("");
pc.onicecandidate = (event: RTCPeerConnectionIceEvent) => {
if (!event.candidate) return resolve(null);
const parts = event.candidate.candidate.split(" ");
const ip = parts[4];