Skip to content

Instantly share code, notes, and snippets.

@kzim44
kzim44 / GIF-Screencast-OSX.md
Created September 7, 2021 19:52 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@kzim44
kzim44 / Mailer.py
Created November 11, 2015 05:42 — forked from rdempsey/Mailer.py
#!/usr/bin/env python
# encoding: utf-8
"""
Mailer.py
Created by Robert Dempsey on 11/07/14.
Copyright (c) 2014 Robert Dempsey. All rights reserved.
"""
import sys
import os
@kzim44
kzim44 / UIView+CustomTimingFunction.h
Last active November 9, 2015 23:04 — forked from nuthinking/UIView+CustomTimingFunction.h
UIView Custom Timing Functions
//
// UIView+CustomTimingFunction.h
// Instants
//
// Created by Christian Giordano on 16/10/2013.
// Copyright (c) 2013 Christian Giordano. All rights reserved.
//
#import <UIKit/UIKit.h>
@kzim44
kzim44 / csvcut
Created October 26, 2015 16:10 — forked from dbro/csvcut
Command line 'cut' utility that can handle csv quoting. This allows proper handling of fields that contain delimiters, both field and record delimiters like commas and newlines. Thanks to github.com/JoeGermuska for the initial version of the code.
#!/usr/bin/env python
"""
from https://gist.github.com/JoeGermuska/561347
Like cut, but for CSVs. To be used from a shell command line.
Note that fields are 1-based, similar to the UNIX 'cut' command.
Should use something better than getopt, but this works...
Usage:
@kzim44
kzim44 / 0_reuse_code.js
Last active August 29, 2015 14:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@kzim44
kzim44 / getUriForDataItem.snippet.java
Created September 19, 2014 16:34
Code to calculate the full URI for a DataItem in the Wear SDK data store.
// From this stackoverflow answer: http://stackoverflow.com/a/24607116/468310
private Uri getUriForDataItem() {
// If you've put data on the local node
String nodeId = getLocalNodeId();
// Or if you've put data on the remote node
// String nodeId = getRemoteNodeId();
// Or If you already know the node id
// String nodeId = "some_node_id";
return new Uri.Builder().scheme(PutDataRequest.WEAR_URI_SCHEME).authority(nodeId).path("/path_to_data").build();
@kzim44
kzim44 / alternate_main.m
Created July 3, 2014 00:54
Alternate AppDelegate for XCTest
//I had a need to use a different app delegate in Convene’s XCTest suite today, so I took the time to figure out how to do it.  Quite simple really:
//Switch your main.m to:
@autoreleasepool {
BOOL runningTests = NSClassFromString(@"XCTestCase") != nil;
if (!runningTests) {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([CVNAppDelegate class]));
} else {
return UIApplicationMain(argc, argv, nil, @"CVNTestAppDelegate");
@kzim44
kzim44 / .gitignore
Last active August 29, 2015 14:03
.gitignore file for android studio
# Mac OS X clutter
*.DS_Store
# Windows clutter
Thumbs.db
# built application files
*.apk
*.ap_
@kzim44
kzim44 / CustomTypefaceSpan.java
Created May 12, 2014 23:19
Android: Support class to enable setting a custom type face in a spannable string.
package my.app;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.text.TextPaint;
import android.text.style.TypefaceSpan;
public class CustomTypefaceSpan extends TypefaceSpan {
private final Typeface newType;
@kzim44
kzim44 / SimpleCursorLoader.java
Created May 11, 2014 04:23
A custom cursor loader to facilitate using a SQLite database with the Android LoaderManager framework, but without the need for a Content Provider.
import android.content.Context;
import android.database.Cursor;
import android.support.v4.content.AsyncTaskLoader;
/**
* Used to write apps that run on platforms prior to Android 3.0. When running
* on Android 3.0 or above, this implementation is still used; it does not try
* to switch to the framework's implementation. See the framework SDK
* documentation for a class overview.
*