Skip to content

Instantly share code, notes, and snippets.

{
"edid": {
"dmt_found": false,
"hdmi_audio": true,
"is_monitor": true,
"model": "HDMI",
"preferred_group": "DMT",
"preferred_hz": 60.0,
"preferred_mode": 27,
"preferred_res": "1280x800p",
// protractor configuration file for cucumber
exports.config = {
allScriptsTimeout: 11000,
specs: [
'features/**/*.feature'
],
capabilities: {
'browserName': 'chrome'
@pellekrogholt
pellekrogholt / AppDelegate.swift
Last active January 4, 2023 18:20
iOS notification scenario: A daily repeating local notification should fire a onetime/single local notification under some conditions. This onetime/single local notification must be shown as a banner when the app is in foreground. When user clicks the banner - the onetime/single local notification should be removed from the global/system `notifi…
import UIKit
import JCNotificationBannerPresenter
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
/**
* ================== angular-ios9-uiwebview.patch.js v1.1.1 ==================
*
* This patch works around iOS9 UIWebView regression that causes infinite digest
* errors in Angular.
*
* The patch can be applied to Angular 1.2.0 – 1.4.5. Newer versions of Angular
* have the workaround baked in.
*
* To apply this patch load/bundle this file with your application and add a
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
#!/bin/sh
mac=$1
kill_list_of_pids() {
pids=$1
# lets kill them - had to use hard `kill -9` to get it working
# and remember to send to background otherwise only first item is killed
for pid in $pids; do
kill -9 $pid > /dev/null 2> /dev/null &
return {
'debug': log_debug(msg),
'info': log_debug(msg),
'warning': log_warning(msg),
'error': log_error(msg),
'critical': log_critical(msg)
}[log_level]
26,27c26,30
< if hasattr(socket, "AF_BLUETOOTH"):
<
---
> # note: open-wrt doesn't play well with python socket and bluetooth
> # on socket.connect((mac, port)) it keept raising errors like:
> # http://pastebin.com/61dWyUZF
> # solution: force to use py-bluez that wrap bluez.
> if False:
<!DOCTYPE html>
<html>
<head>
<title>Example of ajax CORS problem</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="example_get.js"></script>
</head>
<body>
<p>Lets say we load this page from apache: http://127.0.0.1/~user/javascript_ajax_cors/example_get.html</p>
|announcerInstance announcerInstanceDoInitialize point1 point2 announcer1 announcer2|
Transcript clear.
announcerInstanceDoInitialize := false.
announcerInstance := FilteringAnnouncer current.
announcerInstanceDoInitialize ifTrue: [announcerInstance initialize].
"announcerInstanceDoInitialize ifTrue: [announcerInstance teardown]."