Skip to content

Instantly share code, notes, and snippets.

View krzemienski's full-sized avatar
💭
📼

Nick Krzemienski krzemienski

💭
📼
View GitHub Profile
@krzemienski
krzemienski / README.md
Created June 12, 2018 06:30 — forked from mrbar42/README.md
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8

Note: This is an older post that I did back when I thought I might have time to be a blogger. Oh I was oh so wrong. However, it has proven useful for some folks on stackoverflow. Thus I'm keeping it alive here on Gist.

One of my past projects dealt heavily with an open source Apple technology called HTTP Live Streaming. It’s an HTTP based streaming protocol that at its most fundamental level provides a way to stream video and audio from just about any server with nothing but a few free software tools provided by Apple**. However, it has a few additional features that I think make it a really exciting tool. Yet, I haven’t seen HTTP Live Streaming used very much. This is probably mainly due to the combination of a lack of good/clear documentation, and Apple’s Live Streaming Developer Tools being command line based also make the barrier to entry higher than many developers want to deal with.

The hope is to share my understanding of how to use this technology to:

How to setup Shadowsocks on your Ubuntu server

Your school or company network may block the access to a few specific websites. To solve this problem, I'd highly recommend Shadowsocks, since it is the easiest proxy tool I've ever found, and it's FREE (of course iff you have your own server running).

First, ssh to your server, and make sure you have Python and pip installed. If you have Python but not pip, install it using the following command

$ sudo apt-get install python3-pip
@krzemienski
krzemienski / update_git_repos.sh
Created August 14, 2018 05:50 — forked from douglas/update_git_repos.sh
Update all git repositories under a base directory
#!/bin/bash
# store the current dir
CUR_DIR=$(pwd)
# Let the person running the script know what's going on.
echo "\n\033[1mPulling in latest changes for all repositories...\033[0m\n"
# Find all git repositories and update it to the master latest revision
for i in $(find . -name ".git" | cut -c 3-); do
@krzemienski
krzemienski / A SceneGraph JSON Feed Example.md
Created August 14, 2018 20:44 — forked from timbeynart-nbcuni/A SceneGraph JSON Feed Example.md
Code examples for parsing a JSON feed into a RowList

This example shows how to load a JSON feed into a ScenGraph RowList in Roku. It's not a complete application. This code started life as Simple_Grid_with_Details_and_Video, available here: https://blog.roku.com/developer/2016/03/03/scenegraph-tutorial/

The json_parser.brs file has the brightscript code to load the feed data (represented by the contents of data.json). The data is then translated into an array of MediaItems. MediaItem is an extended ContentNode. Then the data is structured to load into a RowList, which is represented in GridScreen.xml.

@krzemienski
krzemienski / Optional Extensions.swift
Created September 6, 2018 10:10 — forked from Ericdowney/Optional Extensions.swift
Swift gist for medium article explaining optional + extensions
extension Optional where Wrapped == String {
var valueOrEmpty: String {
guard let unwrapped = self else {
return ""
}
return unwrapped
}
}
@krzemienski
krzemienski / things3-to-of3.applescript
Created December 14, 2018 04:31 — forked from matellis/things3-to-of3.applescript
Script to import from Things 3 into Omnifocus 3
--------------------------------------------------
--------------------------------------------------
-- Import tasks from Things to OmniFocus
--------------------------------------------------
--------------------------------------------------
--
-- Script taken from: http://forums.omnigroup.com/showthread.php?t=14846&page=2 && https://gist.github.com/cdzombak/11265615
-- Added: OF3 & Things 3 compatibility; task order; areas/folders; tags
-- Empty your Things Trash first.
--
@krzemienski
krzemienski / readme.md
Created January 10, 2019 14:40 — forked from thepixture/readme.md
VS Code CSS addition to increase readability on file tree.

Increases indentation on the file tree and adds some lines to each directory/file.

Works 15 levels deep, but you can expand it by just adding more of each line thats repeating, i.e.:

  • add another box shadow
    • (n*-20px) 0 0 0 rgba(255, 255, 255, 0.4)
  • add another padding-left
    • .monaco-tree-row[aria-level="n"] { padding-left: ((n-1)*20)px; }
  • add another :before & :after with left positioning
    • .monaco-tree-row[aria-level="n"]:before { left: (((n-1)*20)-9)px; }
  • .monaco-tree-row[aria-level="n"]:after { left: (((n-1)*20)-9)px; }
@krzemienski
krzemienski / sugh.sh
Created February 4, 2019 08:53 — forked from erdincay/sugh.sh
su GitHub (downloading all repositories from a given user)
#!/bin/bash
if [ -z "$1" ]; then
echo "waiting for the following arguments: username + max-page-number"
exit 1
else
name=$1
fi
if [ -z "$2" ]; then
@krzemienski
krzemienski / Install NVIDIA Driver and CUDA.md
Created May 20, 2019 19:06 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS