Skip to content

Instantly share code, notes, and snippets.

|announcerInstance announcerInstanceDoInitialize point1 point2 announcer1 announcer2|
Transcript clear.
announcerInstanceDoInitialize := false.
announcerInstance := FilteringAnnouncer current.
announcerInstanceDoInitialize ifTrue: [announcerInstance initialize].
"announcerInstanceDoInitialize ifTrue: [announcerInstance teardown]."
<!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>
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:
return {
'debug': log_debug(msg),
'info': log_debug(msg),
'warning': log_warning(msg),
'error': log_error(msg),
'critical': log_critical(msg)
}[log_level]
#!/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 &
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
/**
* ================== 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
@pellekrogholt
pellekrogholt / python2.4.rb
Created December 5, 2012 13:47 — forked from kingel/python2.4.rb
homebrew python2.4 formula (osx 10.8)
require 'formula'
class Python24 <Formula
url 'http://www.python.org/ftp/python/2.4.6/Python-2.4.6.tgz'
homepage 'http://www.python.org/download/releases/2.4.6/'
md5 '7564b2b142b1b8345cd5358b7aaaa482'
depends_on 'gdbm' => :optional
depends_on 'readline'
@pellekrogholt
pellekrogholt / configure.zcml
Created December 11, 2012 20:48
extend collective.contentrules.mail 0.4 / plone 3.1
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:five="http://namespaces.zope.org/five"
xmlns:browser="http://namespaces.zope.org/browser"
i18n_domain="mysite.site">
<include package="z3c.unconfigure" file="meta.zcml" />
<unconfigure>
<adapter factory="collective.contentrules.mail.adapter.MailReplacer" />
@pellekrogholt
pellekrogholt / gist:4353273
Created December 21, 2012 14:54
html start tags for various ie tweaks
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--[if IE 7]> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" class="ie7 oldie"> <![endif]-->
<!--[if IE 8]> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" class="ie8 oldie"> <![endif]-->
<!--[if gt IE 8]><!--> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!--<![endif]-->
<head>