Skip to content

Instantly share code, notes, and snippets.

Avatar
📟

Stef Kors StefKors

📟
View GitHub Profile
View phoneNumberUtil.ts
export type BaseCountry = {
// the ISO 3166-1 code for the country
code: string
// the name of the country (in english)
name: string
// the raw emoji for the country's flag (can be multiple codepoints)
emoji: string
// the international dialing code for the country (without the `+` prefix or escape codes)
dial_country_code: string
// the regions codes, if any
@StefKors
StefKors / Emoji.swift
Created Dec 15, 2022
Array of Emoji manually filtered to contain only all the fun and positive ones
View Emoji.swift
let array = ["😀", "😃", "😄", "😁", "😆", "😅", "😂", "🤣", "🥲", "🥹", "😊", "😇", "🙂", "🙃", "😉", "😌", "😍", "🥰", "😘", "😗", "😙", "😚", "😋", "😛", "😝", "😜", "🤪", "🤨", "🧐", "🤓", "😎", "🥸", "🤩", "🥳", "😏", "😒", "😞", "😔", "😟", "😕", "🙁", "☹️", "😣", "😖", "😫", "😩", "🥺", "😢", "😭", "🤯", "🥶", "😱", "😨", "😰", "😥", "😓", "🫣", "🤗", "🫡", "🤔", "🫢", "🤭", "🤫", "🤥", "😶", "😶‍🌫️", "😐", "😑", "😬", "🫠", "🙄", "😯", "😮", "😲", "🥱", "😴", "🤤", "😪", "😵", "😵‍💫", "🫥", "🤐", "🥴", "🤢", "🤑", "🤠", "🤡", "💩", "👻", "👽", "👾", "🤖", "🎃", "😺", "😸", "😹", "😻", "😼", "😽", "🙀", "👋", "🤚", "🖐", "✋", "🖖", "👌", "🤌", "🤏", "✌️", "🤞", "🫰", "🤟", "🤘", "🤙", "🫵", "🫱", "🫲", "🫳", "🫴", "👈", "👉", "👆", "🖕", "👇", "☝️", "👍", "👎", "✊", "👊", "🤛", "🤜", "👏", "🫶", "🙌", "👐", "🤲", "🤝", "🙏", "✍️", "💅", "🤳", "💪", "🦾", "🦵", "🦿", "🦶", "👣", "👂", "🦻", "👃", "🫀", "🫁", "🧠", "🦷", "🦴", "👀", "👁", "👶", "👧", "🧒", "👦", "👩", "🧑", "👨", "👩‍🦱", "🧑‍🦱", "👨‍🦱", "👩‍🦰", "🧑‍🦰", "👨‍🦰", "👱‍♀️", "👱", "👱‍♂️", "👩‍🦳", "🧑‍🦳", "👨‍🦳", "👩‍🦲", "🧑‍🦲", "👨‍🦲", "🧔‍♀️", "🧔", "🧔‍♂️", "👵", "🧓", "👴", "👲", "👳‍♀️", "👳", "👳‍♂️", "🧕", "👮‍♀️", "👮
@StefKors
StefKors / DraggableView.swift
Created Jul 31, 2021 — forked from ohayon/DraggableView.swift
Example of making a reusable `draggable()` modifier for SwiftUI Views
View DraggableView.swift
struct DraggablePita: View {
var body: some View {
Image(uiImage: UIImage(named: "pita.png")!)
.draggable() // Add the new, custom modifier to make this draggable
}
}
// Handle dragging
struct DraggableView: ViewModifier {
@State var offset = CGPoint(x: 0, y: 0)
View Hi.txt
_ _ _ _
| | | | ___ | || | ___
| |_| | / _ \| || | / _ \
| _ || __/| || || (_) |
|_| |_| \___||_||_| \___/
View get my gf to hacker 3000.md

install the following

xcode-select --install

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

brew install git

git config --global user.name "Your Name Here"
View flickr.js
const router = require('express').Router()
// FLICKR
const FLICKR_API = require('../../settings/flickr.js')
const Flickr = require('flickr-sdk')
const flickr = new Flickr(FLICKR_API.key)
// FIREBASE
const admin = require('firebase-admin')
const serviceAccount = require('./../../settings/progressbar-cache-firebase-adminsdk.json')
// init firebase app
@StefKors
StefKors / index.html
Created Apr 5, 2019
A gyroscopic golf game built during the Hackers and Designers Walking Signals Workshop
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>oh my golf</title>
<style>
*,
*:before,
*:after {
@StefKors
StefKors / index.html
Created Jan 24, 2019
return soundcloud id from playlist link
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
@StefKors
StefKors / geolocation githook
Created Jun 10, 2018
Want to be a cool digital nomad, or laptop adventurer? Add your geolocation to your git commits:
View geolocation githook
#!/bin/bash
#http://iharder.sourceforge.net/current/macosx/locateme/
#copy paste this into the .git/hooks/prepare-commit-msg file
#install locateme into your project directory
LAT=`./LocateMe -f "{LAT}"`
LNG=`./LocateMe -f "{LON}"`
URL="http://maps.googleapis.com/maps/api/geocode/json?latlng=$LAT,$LNG&sensor=false"
ADDRESS=`eval "curl -s \"$URL\" | grep formatted_address | head -n 1 | sed 's/\"//g' | sed 's/,//g'"`
View gist:11e77b654e9b4e6d242f
#include <Servo.h>
// fotocel
float photocellPinL = 0; // the cell and 10K pulldown are connected to a0
float photocellPinR = 1; // the cell and 10K pulldown are connected to a0q
float photocellReadingL; // fotocell reading LINKS
float photocellReadingR; // fotocell reading RECHTS
Servo myServo; // Servo Object
int servoPin = 9; // ServoPin Nummer