Skip to content

Instantly share code, notes, and snippets.

View TyrfingMjolnir's full-sized avatar
💭
in my scriptorium whipping up some whoopass

Tyrfing Mjølner TyrfingMjolnir

💭
in my scriptorium whipping up some whoopass
View GitHub Profile
## Still in 2014 I'm on FM11SA and would like to know if it's possible to run this trick
## from http://www.haxney.org/2012/06/use-filemaker-web-publishing-in-apache.html
## This is just a fork, the first line at least has its file in place for FM11SA
## Used this solution for now with IIS: http://forums.filemaker.com/posts/8d17326af1
LoadModule jk_module "c:/Program Files/FileMaker/FileMaker Server/Web Publishing/publishing-engine/web-server-support/apache-2.2/mod_jk.so"
JkWorkersFile "c:/Program Files/FileMaker/FileMaker Server/Admin/admin-helper/WEB-INF/conf/workers.properties"
JkMountFile "c:/Program Files/FileMaker/FileMaker Server/Admin/admin-helper/WEB-INF/conf/uriworkermap.properties"
<?php
// name might have to be: myfunkyscript.php.xml for FileMaker to accept this as an XML-source.
require_once( '/opt/FXphp/FX.php' );
require_once( '/opt/mercutio/log.php' );
require_once( '/opt/mercutio/local.php' );
require_once( '/opt/mercutio/supplier.php' );
require_once( '/opt/mercutio/client.php' );
$id = $_GET['id'];
prefetch fm_updater_12.0.4.403.dmg sha1:2f9673946f2bf7cd1f6ccc91acddd2b34c01271a size:586898054 http://fmdl.filemaker.com/UPDT/12/fm_updater_12.0.4.403.dmg
delete "/tmp/fm_updater_12.0.4.403.dmg"
move "{posix path of file "fm_updater_12.0.4.403.dmg" of folder "__Download" of client folder of current site}" "/tmp/fm_updater_12.0.4.403.dmg"
wait /usr/bin/hdiutil attach -quiet -nobrowse -mountpoint "/tmp/FMPROUPDATE1204" "/tmp/fm_updater_12.0.4.403.dmg"
wait /bin/sh -c "/usr/sbin/installer -pkg /tmp/FMPROUPDATE1204/FileMaker\ 12v4\ Updates.pkg -target /"
wait /usr/bin/hdiutil detach -force "/tmp/FMPROUPDATE1204"
delete "/tmp/fm_updater_12.0.4.403.dmg"
var $UTF8SpecialChars = array(
"|([\xC2-\xDF])([\x80-\xBF])|e",
"|(\xE0)([\xA0-\xBF])([\x80-\xBF])|e",
"|([\xE1-\xEF])([\x80-\xBF])([\x80-\xBF])|e",
"|(\xF0)([\x90-\xBF])([\x80-\xBF])([\x80-\xBF])|e",
"|([\xF1-\xF3])([\x80-\xBF])([\x80-\xBF])([\x80-\xBF])|e",
"|(\xF4)([\x80-\x8F])([\x80-\xBF])([\x80-\xBF])|e"
);
var $UTF8HTMLEntities = array(
@TyrfingMjolnir
TyrfingMjolnir / ReloadDataFromHTML.js
Created April 3, 2014 00:43
Sample $scope function reloading table data
<a ng-click="getData()">Reload</a>
$scope.getData = function() {
$http.get( 'phones/phones.json' ).success( function( data ) {
$scope.phones = data;
}
}
//FixturesObject.m
//...
NSString *dateString = [NSString stringWithFormat: @"%@",object.date];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ssZ"];
NSDate *myDate = [dateFormatter dateFromString:dateString];
NSString *dateInEpoch = [NSString stringWithFormat:@"%.0f", [myDate timeIntervalSince1970]];
//
// FixturesController.m
// Liga Zon Sagres Companion
//
// Created by Berto Bettencourt on 2/10/2014.
// Copyright (c) 2014 Orrian. All rights reserved.
//
#import "FixturesController.h"
#import "GADBannerView.h"
var o2x = require( 'object-to-xml' );
var j2c = require( 'json-2-csv' );
var j2t = require( 'json-2-tsv' );
function( req, res, next ) {
if( req.accepts( 'application/json' ) ) {
return res.json( req.payload );
}
if( req.accepts( 'text/xml' ) ) {
res.set( 'content-type', 'text/xml' );
/**
*
* Convert Excel dates into JS date objects
* exampleInput: "42090"
* exampleOutput: "Fri Mar 27 2015 01:00:00 GMT+0100 (CET)"
*
* @param excelDate {Number}
* @return {Date}
*
*/

Share a ZFS file system over SMB/CIFS and advertise it via mDNS so that it shows up in the OS X Finder. Assumes SmartOS, but should work fine on any illumos distribution.

# Create volume
zfs create zones/store

# Allow guest access to a trusted subnet
zfs set sharesmb=rw=10.10.1.0/22,guestok=true,name=store zones/store

# Advertise the SMB service, it will now show up in Finder