Skip to content

Instantly share code, notes, and snippets.

View jessearmand's full-sized avatar

Jesse Armand jessearmand

View GitHub Profile
@jessearmand
jessearmand / hdzeroTStoMP4.sh
Last active February 18, 2024 13:05
Convert HDZero DVR ts format to mp4 with H265 codec
#!/usr/bin/env sh
# Check if exactly 2 arguments are given
if [ "$#" -ne 2 ]; then
echo "Usage: $0 input_filename.ts output_filename.mp4"
exit 1
fi
input_file="$1"
output_file="$2"
@jessearmand
jessearmand / parse_latlon.rs
Last active March 25, 2023 08:11
Parse latitude longitude information from Exif tag for files in a directory (initial boilerplate from you.com, improved with kamadak-exif sample code)
use std::env;
use std::fs;
use std::fs::File;
use std::io::BufReader;
use std::path::PathBuf;
use exif::{In, Reader, Tag};
fn main() {
let args: Vec<String> = env::args().collect();
@jessearmand
jessearmand / bing_parse_latlon.rs
Last active March 25, 2023 08:08
parse_latlon (Generated by Bing)
use exif::{DateTime, Field, Reader};
use regex::Regex;
use std::env;
use std::fs::File;
use std::io::{BufReader, Error};
use std::path::PathBuf;
use walkdir::WalkDir;
fn main() -> Result<(), Error> {
let re = Regex::new(r"\.(jpg|jpeg|png|gif|mp4|mov)$").unwrap();
@jessearmand
jessearmand / mpParse.m
Created November 23, 2010 13:59
A command line tool to parse .mobileprovision file
//
// © 2008 Eugene Solodovnykov
// http://idevblog.info/mobileprovision-files-structure-and-reading/
//
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
@jessearmand
jessearmand / Mutation.kt
Last active March 23, 2019 13:40
Node mutation. Testing how a class is being mutated on Kotlin.
/**
* You can edit, run, and share this code.
* play.kotlinlang.org
*/
class Node(name: String) {
var position: FloatArray = floatArrayOf(0.0f, 0.0f, 0.0f)
var rotation: FloatArray = floatArrayOf(0.0f, 0.0f, 0.0f, 0.0f)
var name: String = name
var children: Array<Node> = emptyArray()
@jessearmand
jessearmand / Mutation.swift
Created March 23, 2019 13:30
To test class mutation in Swift. The same behaviour as Kotlin, when the class has mutable properties
//: [Previous](@previous)
/*:
# Mutation
To test class mutation in Swift.
The same behaviour as Kotlin, when the class has mutable properties.
*/
@jessearmand
jessearmand / NSColor+isLight.h
Created May 16, 2018 03:11 — forked from kaishin/NSColor+isLight.h
Programmatically determine the perceived lightness of a color. More details on: http://robots.thoughtbot.com/closer-look-color-lightness + Online tool: http://thoughtbot.github.io/color-lightness-test/
#import <Cocoa/Cocoa.h>
@interface NSColor (isLight)
- (BOOL)isLight;
@end
@jessearmand
jessearmand / Model
Created July 11, 2014 06:39
Library Management
{
"isbn12345": {
"title": "Introdution to Algorithms",
"available": true,
"borrow_date": 1405062840,
"due_date": 1405102840,
"student334343": {
"name": "Sergey Brin",
"books": ["isbn12345", "isbn12346"]
}

Keybase proof

I hereby claim:

  • I am jessearmand on github.
  • I am jessearmand (https://keybase.io/jessearmand) on keybase.
  • I have a public key ASD5t-v5WMuSFh19tH9pKmg2hcXYuEIMY0nOOhjh7OnWxgo

To claim this, I am signing this object: