Skip to content

Instantly share code, notes, and snippets.

View mmick66's full-sized avatar
🎸
Always on the Lookout for Gigs

Michael Michailidis mmick66

🎸
Always on the Lookout for Gigs
View GitHub Profile
@magegu
magegu / multipart.js
Last active July 11, 2023 20:12
mutipart upload for aws s3 with nodejs based on the async lib including retries for part uploads
/*
by Martin Güther @magegu
just call it:
uploadFile(absoluteFilePath, callback);
*/
var path = require('path');
var async = require('async');
@fheisler
fheisler / q.py
Created March 31, 2015 23:02
Q-learning Tic-tac-toe
import random
class TicTacToe:
def __init__(self, playerX, playerO):
self.board = [' ']*9
self.playerX, self.playerO = playerX, playerO
self.playerX_turn = random.choice([True, False])
def play_game(self):
@noppoMan
noppoMan / WebViewWithNSURLConnectionDelegateSampleController.swift
Created January 18, 2015 18:39
Very Small Sample Code for UIWebView With NSURLConnectionDelegate and Basic Authorizaion
//
// WebViewWithNSURLConnectionDelegateSampleController.swift
// SwiftSamples
//
// Created by Yuki Takei on 1/18/15.
// Copyright (c) 2015 noppoman. All rights reserved.
//
import Foundation
import UIKit
@wuhao5
wuhao5 / png_build.sh
Last active December 1, 2019 21:53
build libpng for iOS/MacOS X
rm -rf install_*
rm -rf output-*
# build simulator
./configure --prefix=`pwd`/install_i386 CFLAGS="-Ofast -mios-version-min=5.0" LDFLAGS="-flto" CC="xcrun -sdk iphonesimulator clang -arch i386"
make clean && make -j8 && make install
./configure --prefix=`pwd`/install_x86_64 CFLAGS="-Ofast -mios-version-min=5.0" LDFLAGS="-flto" CC="xcrun -sdk iphonesimulator clang -arch x86_64"
make clean && make -j8 && make install
@codingrhythm
codingrhythm / UIColor+HexString.h
Last active February 7, 2019 14:25
Objective-C class to convert hex string to UIColor. Support #RGB # ARGB #RRGGBB #AARRGGBB Usage: [UIColor colorWithHexString:@"#f5e6a1"];
//
// UIColor+HexString.h
// Class to convert hex string to UIColor
// Support #RGB # ARGB #RRGGBB #AARRGGBB
// Usage: [UIColor colorWithHexString:@"#f5e6a1"];
// Created by Zhu Yuzhou on 1/20/13.
//
#import <UIKit/UIKit.h>