Skip to content

Instantly share code, notes, and snippets.

View joacim-boive's full-sized avatar

Joacim Boive joacim-boive

View GitHub Profile
@joacim-boive
joacim-boive / lotusScriptSlowLoop
Last active August 29, 2015 13:59
Slow looping LotusScript - Just a normal looping construct. But, there's a better way!
Option Public
Option Declare
Use "helpers"
Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Dim vRequest As NotesView
Dim vMatchVacancy As NotesView
Dim vcRequest As NotesViewEntryCollection
Dim vcMatchVacancy As NotesViewEntryCollection
#!/usr/bin/osascript
# Name of the device as visible in Safari->Develop menu
set deviceName to "iPhone Simulator"
# Number of seconds to wait for the simulator window to show up
set maxWait to 30
# ---------------------------------------
# You shouldn't modify anything below here
Option Public
Option Declare
Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Dim vRequest As NotesView
Dim vMatchVacancy As NotesView
Dim veRequest As NotesViewEntry
Dim veMatchVacancy As NotesViewEntry
Dim rowIds As String
test
@joacim-boive
joacim-boive / Xcode console error message
Created September 23, 2014 06:29
CDVPlugin class CDVNotification (pluginName: Notification) does not exist.
2014-09-23 08:27:40.512 Rooms[7288:414440] CDVPlugin class CDVNotification (pluginName: Notification) does not exist.
2014-09-23 08:27:40.512 Rooms[7288:414440] ERROR: Plugin 'Notification' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
2014-09-23 08:27:40.512 Rooms[7288:414440] -[CDVCommandQueue executePending] [Line 158] FAILED pluginJSON = [
"Notification1434422161",
"Notification",
"alert",
[
"You have to perform the setup, before you can use the application.",
"Perform Setup",
"Don't worry, it's easy"
@joacim-boive
joacim-boive / shellshock
Created September 29, 2014 06:16
Patch OS X against Shellshock vunerability
$ # If you want to disable auto-imported functions, uncomment the following
$ # export ADD_IMPORT_FUNCTIONS_PATCH=YES
$ mkdir bash-fix
$ cd bash-fix
$ curl https://opensource.apple.com/tarballs/bash/bash-92.tar.gz | tar zxf -
$ cd bash-92/bash-3.2
$ curl https://ftp.gnu.org/pub/gnu/bash/bash-3.2-patches/bash32-052 | patch -p0
$ curl https://ftp.gnu.org/pub/gnu/bash/bash-3.2-patches/bash32-053 | patch -p0
$ # See note above about ADD_IMPORT_FUNCTIONS_PATCH
$ [ "$ADD_IMPORT_FUNCTIONS_PATCH" == "YES" ] && curl http://alblue.bandlem.com/import_functions.patch | patch -p0
@joacim-boive
joacim-boive / swipeFunc.js
Last active August 29, 2015 14:27 — forked from localpcguy/swipeFunc.js
Simple Mobile Swipe function to get the swipe direction
var swipeFunc = {
touches : {
"touchstart": {"x":-1, "y":-1},
"touchmove" : {"x":-1, "y":-1},
"touchend" : false,
"direction" : "undetermined"
},
touchHandler: function(event) {
var touch;
if (typeof event !== 'undefined'){
//Create a container view
var container = Ti.UI.createView({
width:200,
height:200,
top:10,
left:10
});
//Create a view for our content
var winMain = Titanium.UI.createWindow({
title:'Main',
backgroundColor:'#fff'
});
var winHolder = Titanium.UI.createWindow({
backgroundColor: winMain.backgroundColor
});
@joacim-boive
joacim-boive / Default Collapse?
Created January 5, 2011 09:50
YUI Accordion
<!doctype html>
<html>
<head>
<meta charset=utf-8/>
<title>YUI Plugin: gallery-node-accordion </title>
<link rel="stylesheet" type="text/css"
href="http://yui.yahooapis.com/combo?3.2.0/build/cssfonts/fonts-min.css&3.2.0/build/cssreset/reset-min.css&3.2.0/build/cssbase/base-min.css">
<link type="text/css" rel="stylesheet"
href="http://yui.yahooapis.com/gallery-2010.05.21-18-16/build/gallery-node-accordion/assets/skins/sam/gallery-node-accordion.css"/>
<style>