Skip to content

Instantly share code, notes, and snippets.

View sirovenmitts's full-sized avatar
:shipit:

Kenneth Pullen sirovenmitts

:shipit:
View GitHub Profile
@pudquick
pudquick / notify.py
Last active September 3, 2023 16:51
Notification in pyobjc
# Banner-style (default)
from Foundation import NSUserNotification, NSUserNotificationCenter
def notify(title, subtitle, text):
notification = NSUserNotification.alloc().init()
notification.setTitle_(str(title))
notification.setSubtitle_(str(subtitle))
notification.setInformativeText_(str(text))
notification.setSoundName_("NSUserNotificationDefaultSoundName")
NSUserNotificationCenter.defaultUserNotificationCenter().scheduleNotification_(notification)
@taddev
taddev / gihtubpage.conf
Last active March 5, 2025 18:17
NGINX Reverse proxy settings to Github pages
server {
listen 80 default_server;
listen [::]:80 ipv6only=on default_server;
server_name splunk.net blog.splunk.net www.splunk.net .taddevries.com;
access_log /var/log/nginx/blog.access_log main;
error_log /var/log/nginx/blog.error_log info;
return 301 https://blog.splunk.net;
}
server {
@adamloving
adamloving / show-express-routes-gulp-task.js
Created June 9, 2014 18:23
Gulp task to show the routes in an express app (similar to rails rake routes).
var app = require('../server/app.js').create()
var gulp = require('gulp');
var task = require('./index');
/*
Output all the routes that the app supports
*/
gulp.task('routes', function() {
@venuatu
venuatu / jsonp.js
Created June 28, 2014 16:27
JSONP in an ES6 promise
var jsonp = (function (window) {
var CALLBACK_CHARS = 'abcdefghijklmnopqrstuvwxyz0123456789';
return function jsonp(url, options) {
options = options || {};
options.timeout = options.timeout || 5000;
return new Promise(function (resolve, reject) {
var callback;
@ZevEisenberg
ZevEisenberg / resetAllSimulators.sh
Last active December 23, 2024 19:57
Reset all iOS simulators with this one weird trick
osascript -e 'tell application "iOS Simulator" to quit'
osascript -e 'tell application "Simulator" to quit'
xcrun simctl erase all
@demonixis
demonixis / LaveShader.shader
Created October 25, 2014 09:23
A lave Shader for Unity
Shader "Demonixis/LavaShader" {
Properties {
_MainTexture ("Lava texture", 2D) = "white" {}
_BumpTexture ("Bump texture", 2D) = "white" {}
_DiffuseColor ("Diffuse Color", Color) = (1, 1, 1, 1)
_EmissiveColor ("Emissive Color", Color) = (0, 0, 0, 1)
_Tiling ("Texture tiling", Vector) = (1, 1, 0)
_Offset ("Texture offset", Vector) = (0, 0, 0)
_WeaveSpeed ("_WeaveSpeed", float) = 1
}
@pulkitsinghal
pulkitsinghal / 01-override-User-model.js
Created December 2, 2014 03:27
Strongloop/Loopback - Override User model via boot script
module.exports = function(app) {
var User = app.models.User;
// TODO: (1) find an example of how to add new "properties" to the built-in User mode via boot script
// (2) This is how you can add a "relationship" to the built-in User model via boot script
var SomeOtherModel = app.models.SomeOtherModel;
User.hasMany(SomeOtherModel, {as: 'someOtherModels', foreignKey: 'someOtherModelId'});
// (3) This is how you can add "remote methods" to the built-in User model via boot script
@dburles
dburles / gist:d461e4701eeeb89e884a
Created February 26, 2015 10:31
SimpleSchema password + password (confirm)
... = new SimpleSchema({
password: {
label: "Password *",
type: String
},
passwordConfirm: {
label: "Password (Confirm)",
type: String,
custom: function() {
if (this.value !== this.field('password').value) {
@olalonde
olalonde / boot2docker-use-nfs.sh
Last active December 4, 2023 12:07
Script to mount /Users with nfs instead of vboxsf in boot2docker
#!/bin/bash
#
# This script will mount /Users in the boot2docker VM using NFS (instead of the
# default vboxsf). It's probably not a good idea to run it while there are
# Docker containers running in boot2docker.
#
# Usage: sudo ./boot2docker-use-nfs.sh
#
@AminaKeldibek
AminaKeldibek / Multiple camera calibration procedure.md
Last active March 12, 2022 08:31
Multiple camera calibration

The document provides description on calibration of three Kinect for Microsoft sensors connected to one computer with several usb controllers. Three cameras setup is shown below:

![Figure 1] (http://i.imgur.com/sdOWbVl.jpg)

Intrinsic, extrinsic, and Kinect2Kinect calibration is performed to know the position of each sensor in the space. Our setup is ROS Indigo with Ubuntu 14.04. freenect_launch and camera_pose ROS packages are used. Camera_pose package provides the pipeline to calibrate the relative 6D poses between multiple camera's. freenect_launch package contains launch files for using OpenNI-compliant devices in ROS. It creates a nodelet graph to transform raw data from the device driver into point clouds, disparity images, and other products suitable for processing and visualization. It is installed with catkin as follows:

# Prep