Skip to content

Instantly share code, notes, and snippets.

View krzemienski's full-sized avatar

Nick Krzemienski krzemienski

View GitHub Profile
@Arclite
Arclite / .gitlab-ci.yml
Last active August 12, 2018 19:05
Companion files for "Adding GitLab CI Support"
stages:
- test
- beta
variables:
LC_ALL: "en_US.UTF-8"
LANG: "en_US.UTF-8"
test:
dependencies: []
stage: test
artifacts:
@Ericdowney
Ericdowney / Optional Extensions.swift
Created August 24, 2018 20:46
Swift gist for medium article explaining optional + extensions
extension Optional where Wrapped == String {
var valueOrEmpty: String {
guard let unwrapped = self else {
return ""
}
return unwrapped
}
}
@thepixture
thepixture / readme.md
Last active March 19, 2019 01:16 — forked from jakewtaylor/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; }
@armandocerna
armandocerna / .xinitrc
Created November 28, 2018 04:07
P52 Optimus xorg config
xrandr --setprovideroutputsource 0 1
xrandr --auto
i3
@sinkers
sinkers / check_keyframes.py
Last active November 16, 2019 19:56
Checking keyframe alignment using ffprobe
import re
import subprocess
import logging
import math
import json
import pygal
import sys
logger = logging.getLogger(__name__)
'''
@krzemienski
krzemienski / backup-github.sh
Created May 15, 2020 12:01 — forked from rodw/backup-github.sh
A simple script to backup an organization's GitHub repositories, wikis and issues.
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
# NOTE: if you have more than 100 repositories, you'll need to step thru the list of repos
# returned by GitHub one page at a time, as described at https://gist.github.com/darktim/5582423
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up
# (if you're backing up a user's repos instead, this should be your GitHub username)
GHBU_UNAME=${GHBU_UNAME-"<CHANGE-ME>"} # the username of a GitHub account (to use with the GitHub API)
@thebitbytebit
thebitbytebit / waifu2x_VMAF_measurement.sh
Created February 25, 2020 20:24
Waifu2x scaling up vs. Bilinear vs. Bicubic objective measurement
#!/bin/sh
## Christopher Kennedy Feb 2020
## Crunchyroll Waifu2x upscaling objective measurement
##
## Note you must install waifu2x and run this in the waifu2x directory,
## plus have an FFmpeg with VMAF enabled (must build from scratch)
##
## Dependencies:
## https://ffmpeg.org
@cjdd3b
cjdd3b / s3count.md
Last active June 18, 2020 18:31
How to count files in an S3 bucket

Counting files in S3 buckets and folders is harder than it should be. But here's a way to get it done using s3cmd:

  1. Install S3cmd
  • On Mac, brew install s3cmd
  • On Windows, go here
  1. From the command line, run s3cmd --configure

  2. Add your credentials when prompted.

import os
import io
from gzip import GzipFile
from urllib.parse import urlparse
import requests
import boto3
# ~18.4MB compressed
@barbaramartina
barbaramartina / SimpleObserver.swift
Created April 8, 2016 14:56
How to create an observer of operations and queues in Swift. Which properties you can observe + docs links
//
// An Observer class intended to show how KVO works on operations and queues
//
// Created by Barbara Rodeker on 3/3/16.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//