Skip to content

Instantly share code, notes, and snippets.

View sgbasaraner's full-sized avatar
馃挱
Y = 位 f . (位 x . f (x x)) (位 x . f (x x ))

Sarp G眉ney Ba艧araner sgbasaraner

馃挱
Y = 位 f . (位 x . f (x x)) (位 x . f (x x ))
View GitHub Profile
@alexdesousa
alexdesousa / pub_sub.ex
Last active July 19, 2023 16:48
Small pubsub implementation using pg2
defmodule PubSub do
@moduledoc """
This module defines the basic pub-sub functions.
"""
@typedoc """
Channel name.
"""
@type channel :: term()
@slightfoot
slightfoot / main.dart
Last active June 1, 2024 11:10
Firebase Login/Logout Example - by Simon Lightfoot
/*
This example uses the following packages:
firebase_auth: 0.14.0+5
google_sign_in: 4.0.7
provider: 3.1.0+1
Make sure you have setup your project with Firebase by following these instructions:
1. Follow Option 1 instructions here up to Step 3
import 'package:flutter/material.dart';
main() {
runApp(MaterialApp(
home: Scaffold(
body: SafeArea(
child: Stack(
children: <Widget>[
const Lines(),
const IgnorePointer(
@lizrice
lizrice / vpc-fargate.yaml
Created January 23, 2018 18:01
Cloudformation template for setting up VPC and subnets for Fargate
# Usage:
# aws cloudformation --region <region> create-stack --stack-name <stack name> --template-body file://vpc-fargate.yaml
# This template will:
# Create a VPC with:
# 2 Public Subnets
# 2 Private Subnets
# An Internet Gateway (with routes to it for Public Subnets)
# A NAT Gateway for outbound access (with routes from Private Subnets set to use it)
#
@terabyte
terabyte / amazon.md
Created December 6, 2017 02:27
Amazon's Build System

Prologue

I wrote this answer on stackexchange, here: https://stackoverflow.com/posts/12597919/

It was wrongly deleted for containing "proprietary information" years later. I think that's bullshit so I am posting it here. Come at me.

The Question

Amazon is a SOA system with 100s of services (or so says Amazon Chief Technology Officer Werner Vogels). How do they handle build and release?

@cmoulton
cmoulton / URLSession Calls in Swift 4
Last active December 18, 2023 02:31
URLSession Calls in Swift 4
func makeGetCall() {
// Set up the URL request
let todoEndpoint: String = "https://jsonplaceholder.typicode.com/todos/1"
guard let url = URL(string: todoEndpoint) else {
print("Error: cannot create URL")
return
}
let urlRequest = URLRequest(url: url)
// set up the session
@michaelst0
michaelst0 / Property.kt
Last active October 15, 2024 20:14
Example entity with composite key Spring Boot and Kotlin
// This will not serialize!
data class Muppet(val name: String)
// This will serialize!
data class Puppet(val name: String = "")
// Composite key class must implement Serializable
// and have defaults.
class PropertyId(
val uuid: UUID = UUID.randomUUID(),
//
// StoreKitExampleViewController.swift
// StoreKitTest
//
// Created by Atsushi Nagase on 10/2/14.
// Copyright (c) 2014 Atsushi Nagase. All rights reserved.
//
import UIKit
import StoreKit
@hakre
hakre / iconv-l.txt
Created December 2, 2012 12:35
Iconv List of Encodings
ANSI_X3.4-1968 ANSI_X3.4-1986 ASCII CP367 IBM367 ISO-IR-6 ISO646-US ISO_646.IRV:1991 US US-ASCII CSASCII
UTF-8
ISO-10646-UCS-2 UCS-2 CSUNICODE
UCS-2BE UNICODE-1-1 UNICODEBIG CSUNICODE11
UCS-2LE UNICODELITTLE
ISO-10646-UCS-4 UCS-4 CSUCS4
UCS-4BE
UCS-4LE
UTF-16
UTF-16BE