Skip to content

Instantly share code, notes, and snippets.

View jp1987's full-sized avatar
🎯
Focusing

Jesper Paardekooper jp1987

🎯
Focusing
View GitHub Profile
atl*CLI> core show help
! -- Execute a shell command
acl show -- Show a named ACL or list all named ACLs
ael reload -- Reload AEL configuration
ael set debug {read|tokens|macros|contexts|off} -- Enable AEL debugging flags
agi dump html -- Dumps a list of AGI commands in HTML format
agi exec -- Add AGI command to a channel in Async AGI
agi set debug [on|off] -- Enable/Disable AGI debugging
agi show commands [topic] -- List AGI commands or specific help
aoc set debug -- enable cli debugging of AOC messages
@Landrash
Landrash / openzwave-hassbian.sh
Last active February 3, 2019 02:52
Install script for openzwave for hassbian
#!/bin/bash
# Install by running:
# wget -Nnv https://gist.githubusercontent.com/Landrash/8afefca92bfb96c294b5501fc52f4cbc/raw/89ff001897859d70776d9b13e364a9dacc3861a9/openzwave-hassbian.sh && sudo bash openzwave-hassbian.sh
echo "Open Z-Wave Installer for Hassbian"
echo "Copyright(c) 2016 Dale Higgs <https://gitter.im/dale3h>"
echo
echo "Running apt-get preparation"
@MrJackdaw
MrJackdaw / UIView+Border.swift
Last active May 12, 2023 19:02
Swift 3 Extension for adding border to one side of UIView
// This syntax reflects changes made to the Swift language as of Aug. '16
extension UIView {
// Example use: myView.addBorder(toSide: .Left, withColor: UIColor.redColor().CGColor, andThickness: 1.0)
enum ViewSide {
case Left, Right, Top, Bottom
}
@joemasilotti
joemasilotti / ..md
Last active September 13, 2022 14:20
Resetting NSUserDefaults in UI Testing

Resetting NSUserDefaults in UI Testing

  1. Add "UI-Testing" to launchArguments before launching the app under test
  2. On launch, check for the argument in AppDelegate.swift
  3. If it exists remove everything for the app's domain from NSUserDefaults
@pchelnikov
pchelnikov / systemUptime.swift
Last active June 25, 2020 06:52
iOS System Uptime
static func systemUptime() -> TimeInterval {
var currentTime = time_t()
var bootTime = timeval()
var mib = [CTL_KERN, KERN_BOOTTIME]
// NOTE: Use strideof(), NOT sizeof() to account for data structure
// alignment (padding)
// http://stackoverflow.com/a/27640066
// https://devforums.apple.com/message/1086617#1086617
var size = MemoryLayout<timeval>.stride
let result = sysctl(&mib, u_int(mib.count), &bootTime, &size, nil, 0)
import Foundation
import UIKit
public enum UIButtonBorderSide {
case Top, Bottom, Left, Right
}
extension UIButton {
public func addBorder(side: UIButtonBorderSide, color: UIColor, width: CGFloat) {
@htuscher
htuscher / MyRepository.php
Last active February 26, 2018 11:56
TYPO3 Extbase 6.2 debug generated query
<?php
namespace Vendor\Ext\Domain\Repository
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser;
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
use TYPO3\CMS\Extbase\Persistence\Repository;
use TYPO3\CMS\Extbase\Utility\DebuggerUtility;
@morales2k
morales2k / jquery-sidr.js
Created July 8, 2014 17:31
The jquery-sidr fix that made it work for me in all browsers. Try it out and see if it helps!
/*
* Sidr
* https://github.com/artberri/sidr
*
* Copyright (c) 2013 Alberto Varela
* Licensed under the MIT license.
*/
;(function( $ ){
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3DataStructure>
<meta type="array">
<langDisable>1</langDisable>
</meta>
<sheets>
<general>
<ROOT type="array">
<TCEforms>
<sheetTitle>Einstellungen</sheetTitle>

Context

In the Google Summer of Code Project "TYPO3 Flow meets Ember.js" we are trying to make the server-side framework TYPO3 Flow and the client-side framework Ember.js (using Ember Data as the persistence layer) work together easily through conventions and a powerful scaffolding mechanism. You can visit our website to see a more detailed concept.

This document gives a short introduction of:

  • how domain models look like in Flow and Ember Data,
  • how the REST JSON API is expected to look like (to follow Ember Data conventions),
  • for which models REST APIs are provided and how.