Skip to content

Instantly share code, notes, and snippets.

View oboje's full-sized avatar
🎯
Focusing

Igor Popov oboje

🎯
Focusing
  • New York
View GitHub Profile
@jacobbubu
jacobbubu / ioslocaleidentifiers.csv
Created February 15, 2012 14:41
iOS Locale Identifiers
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
ro_MD Romanian (Moldova)
@evands
evands / combine_static_libraries.sh
Created January 14, 2015 20:40
Combine multiple .a static libraries, which may each have multiple architectures, into a single static library
#!/bin/sh
# Combined all static libaries in the current directory into a single static library
# It is hardcoded to use the i386, armv7, and armv7s architectures; this can easily be changed via the 'archs' variable at the top
# The script takes a single argument, which is the name of the final, combined library to be created.
#
# For example:
# => combine_static_libraries.sh combined-library
#
# Script by Evan Schoenberg, Regular Rate and Rhythm Software
@JaviLorbada
JaviLorbada / FRP iOS Learning resources.md
Last active March 19, 2025 07:02
The best FRP iOS resources.

Videos

@phrawzty
phrawzty / 2serv.py
Last active January 16, 2025 08:46
simple python http server to dump request headers
#!/usr/bin/env python2
import SimpleHTTPServer
import SocketServer
import logging
PORT = 8000
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
@hsavit1
hsavit1 / RAC_Samples.m
Created July 21, 2015 00:53
101 RAC Sample
//
// main.m
// 101RACSamples
//
// Created by Matthew Doig on 1/26/14.
// Copyright (c) 2014 DWI. All rights reserved.
//
#pragma mark Asynchronous operators
@hsavit1
hsavit1 / RAC_Gesture.m
Created July 25, 2015 04:14
RAC demonstration of a pan gesture
@interface RACGestureViewController ()
@property(weak, nonatomic) IBOutlet UILabel *translationLabel;
@property(weak, nonatomic) IBOutlet UILabel *stateLabel;
@property(strong, nonatomic) RACSubject *animationDelegate;
@property(weak, nonatomic) IBOutlet UILabel *pinchLabel;
@end
@implementation RACGestureViewController
@paulll
paulll / webp2gif
Last active March 7, 2020 17:21
Convert webp animation to gif
#!/usr/bin/env zsh
# example usage:
# $ webp2gif input.webp output.gif
dir0=`pwd`
dir=`mktemp -d`
cd $dir
for i in $(seq -f "$04g" 0 1000); do; webpmux -get frame $i $dir0/$1 -o "$i.webp"; done;
mkdir png
for i in {0..1000}; do; dwebp "$i.webp" -o "png/$i.png"; done;
@jverkoey
jverkoey / stream.swift
Last active December 16, 2017 07:52
Stream prototype in swift
/**
An Observable emits values to its subscribed observers.
A minimal implementation based upon the reactivex specification:
http://reactivex.io/documentation/observable.html
*/
public class Observable<Value> {
/** Add a new observer. The provided instance will receive all values provided to onNext. */
public func subscribe(_ observer: @escaping (Value) -> Void) -> Observable<Value> {
observers.append(observer)
public func with<T>(_ item: inout T, action: (inout T) -> Void) {
action(&item)
}
public func with<T>(_ item: T, action: (T) -> Void) {
action(item)
}
public func with<T: AnyObject>(_ item: T, action: (T) -> Void) {
action(item)
@wallentx
wallentx / chiastat
Created May 11, 2021 01:38
Dumping chia info to individual items to query via webserver endpoint
#!/usr/bin/env bash
source /home/your/path/to/chia-blockchain/activate
STR=$(chia farm summary | head -8)
FARM=$(chia farm summary | head -8 | sed 's/ /_/g; s/:_/=/g') #jq -Rs '{chia:split("\n")|map(split(": ")|{(.[0]):.[1]}?)}'
ACTIVE=$(pgrep -fa 'chia plots create' | wc -l)
printem() {
echo "Active_Plots=$ACTIVE"