Skip to content

Instantly share code, notes, and snippets.

View iKalin's full-sized avatar
:bowtie:
Focusing

Kalin Tsekov iKalin

:bowtie:
Focusing
View GitHub Profile
@iKalin
iKalin / BlueVC.h
Created February 1, 2012 14:26 — forked from danitentouch/BlueVC.h
UITableVIew with backgroungColor = clearColor
//
// BlueVC.h
// NavigationTests
//
// Created by Dani Rangelov on 1/4/12.
// Copyright (c) 2012 Ten Touch. All rights reserved.
//
#import <UIKit/UIKit.h>
@iKalin
iKalin / BlueVC.h
Created February 1, 2012 14:26 — forked from danitentouch/BlueVC.h
UITableVIew with backgroungColor = clearColor
//
// BlueVC.h
// NavigationTests
//
// Created by Dani Rangelov on 1/4/12.
// Copyright (c) 2012 Ten Touch. All rights reserved.
//
#import <UIKit/UIKit.h>
@iKalin
iKalin / jquery.imagesloaded.js
Created October 26, 2012 14:28 — forked from desandro/jquery.imagesloaded.js
$.fn.imagesLoaded jQuery plugin
// $('img.photo',this).imagesLoaded(myFunction)
// execute a callback when all images have loaded.
// needed because .load() doesn't work on cached images
// Modified with a two-pass approach to changing image
// src. First, the proxy imagedata is set, which leads
// to the first callback being triggered, which resets
// imagedata to the original src, which fires the final,
// user defined callback.
@iKalin
iKalin / Tuple+Generator.swift
Created October 26, 2015 13:27 — forked from jverkoey/Tuple+Generator.swift
Tuple enumeration
/** The returned generator will enumerate each value of the provided tuple. */
func generatorForTuple(tuple: Any) -> AnyGenerator<Any> {
return anyGenerator(Mirror(reflecting: tuple).children.lazy.map { $0.value }.generate())
}
// Blogged at http://design.featherless.software/enumerating-tuple-values-swift/
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@iKalin
iKalin / stream_to_youtube.sh
Created January 29, 2016 03:46 — forked from olasd/stream_to_youtube.sh
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
@iKalin
iKalin / async-server.py
Created July 19, 2016 11:27 — forked from derekkwok/async-server.py
Python 3.5 async "Hello World" server
import asyncio
import socket
SERVER_ADDRESS = (HOST, PORT) = '', 8888
REQUEST_QUEUE_SIZE = 5
http_response = b"""\
HTTP/1.1 200 OK
Hello, World!
"""
@iKalin
iKalin / 0. nginx_setup.sh
Created August 19, 2016 09:50 — forked from mikhailov/0. nginx_setup.sh
Nginx + secure pseudo-streaming
# Nginx can serve FLV/MP4 files by pseudo-streaming way without any specific media-server software.
# To do the custom build we use 2 modules: --with-http_secure_link_module --with-http_flv_module
# This module "secure-link" helps you to protect links from stealing away.
#
# NOTE: see more details at coderwall: http://coderwall.com/p/3hksyg
cd /usr/src
wget http://nginx.org/download/nginx-1.5.13.tar.gz
tar xzvf ./nginx-1.5.13.tar.gz && rm -f ./nginx-1.5.13.tar.gz
@iKalin
iKalin / HLS_dvr.sh
Created July 15, 2017 19:13 — forked from John07/HLS_dvr.sh
A small script to make recording http live streams (HLS, those streams that work on iOS devices) nicer on a Mac. Script records the stream for a defined period of time and sends the user notifications if anything goes wrong and once it's done.
# required: ffmpeg (e.g. from homebrew), terminal-notifier from https://github.com/alloy/terminal-notifier
# you can schedule this with launchd to run e.g. weekly
# Specify in seconds how long the script should record (default here is 1 hour).
seconds=3600
# Date format for the recording file name
DATE=`date "+%d-%m-%y_%H-%M"`
# start ffmpeg recording