Skip to content

Instantly share code, notes, and snippets.

@mustafaileri
mustafaileri / serverless.py
Created April 24, 2020 20:30
sample serverless app with ffmpeg and python
import json
import os
import boto3
def lambda_handler(event, context):
try:
s3 = boto3.client('s3')
"""Downlod video from private S3"""
s3.download_file('serverless-test-2020', 'Big_Buck_Bunny_1080_10s_1MB.mp4', '/tmp/test-video.mp4')
@joeytwiddle
joeytwiddle / github_get_all_forks.sh
Last active October 13, 2023 20:50
Add all forks of the current repo as remotes
#!/usr/bin/env bash
set -e
# See also: https://github.com/frost-nzcr4/find_forks (same thing but in python)
origin_url="$(git remote show origin | grep 'Fetch URL:' | sed 's+.*: ++')"
full_repo_name="$(echo "$origin_url" | sed 's+.*github.com/++ ; s+\.git$++')"
forks_url="https://api.github.com/repos/${full_repo_name}/forks"
@bok-
bok- / SVGImages.md
Created September 11, 2019 01:45
SVG Images with Macaw

SVG Images with Macaaw

Using Macaw its pretty straight forward to use SVG images in your iOS and macOS apps.

Installation

Install via CocoaPods or Carthage. It doesn't support SPM at the time of writing but its pretty easy to fork their repo and add it.

Usage

@caroillemann
caroillemann / Root.plist
Last active April 6, 2021 02:50 — forked from hujunfeng/Root.plist
Add version in Settings.bundle for iOS apps
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>StringsTable</key>
<string>Root</string>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
@matux
matux / scntool.md
Last active April 11, 2023 13:49
SceneKit scntool command line options
$ xcrun scntool --verbose
| Current SceneKit version is 4.560000
| Running scntool (compiled on Jul  1 2018 01:01:55)

usage: scntool --convert file --format format [--output file]
000084a8:  7363 7269 7074 696f 6e00 2d2d 7461 7267 6574 2d70 6c61 7466  :scription.--target-platf
@joncardasis
joncardasis / ColladaAnimationForXcode.py
Last active August 10, 2021 09:31
Convert Collada (.DAE) animation files for Xcode Scenekit Animation use by removing unnecessary data.
#!/usr/local/bin/python
# Jonathan Cardasis, 2018
#
# Cleans up a collada `dae` file removing all unnessasary data
# only leaving animations and bone structures behind.
# Combines multiple animation sequences into a single animation
# sequence for Xcode to use.
import sys
import os
import re
@alextercete
alextercete / docker-wwi.sh
Last active August 7, 2023 16:14
Create a docker container for the WideWorldImporters database
#!/bin/bash
# See: https://docs.microsoft.com/en-us/sql/linux/tutorial-restore-backup-in-sql-server-container
SA_PASSWORD=<YourStrong!Passw0rd>
function show_info {
tput setaf 6; echo $1; tput sgr 0
}
show_info 'Pulling the container image...'
@lewislepton
lewislepton / glsl.json
Last active April 20, 2024 18:15
GLSL snippets for visual studio code/kode studio
/*
AUTO-COMPLETE SNIPPETS FOR GLSL WITHIN VISUAL CODE STUDIO
Lewis Lepton
https://lewislepton.com
useful places that i grabbed info from
http://www.shaderific.com/glsl
https://www.khronos.org/opengl/wiki/OpenGL_Shading_Language
plus various other papers & books
*/
@gnuton
gnuton / Mixamo.js
Last active January 22, 2024 07:29
Script which downloads all mixamo animations for one character.
// Mixamo Animation downloadeer
//
// Author: Antonio Aloisio <gnuton@gnuton.org>
// Contributions: kriNon
//
// The following script make use of mixamo2 API to download all anims for a single character that you choose.
// The animations are saved with descriptive long names instead of the short ones used by default by mixamo UI.
//
// This script has been written by gnuton@gnuton.org and the author is not responsible of its usage
//
@wkirby
wkirby / .apsisrc
Last active November 4, 2020 08:46
Apsis OSX Setup
# Node
nodesize() {
find . -name "node_modules" -type d -prune -print | xargs du -chs
}
nodenuke() {
echo "This command will recursively delete node_modules from your current directory."
echo "Continue (y/n)?"
read CONT