Skip to content

Instantly share code, notes, and snippets.

import stdlib.io.file
function svg_test(id, w, h, stroke) {
<svg:svg
svg:version="1.1"
id="{id}_svg">
<svg:rect id="{id}_node"
width="{w}" height="{h}"
x="{stroke/2}" y="{stroke/2}"
stroke="black" fill="white"
// convenient printer
pp = function(x) { Debug.jlog("{x}") }
a = { name: "John", surname: "Doe" }
pp(a.name)
a = { a extend age: 33 }
pp(a.age)
b = {name: "Mary"}
pp = function(x) { Debug.jlog("{x}")}
type material = { wood } or { plastic } or { metal } // or { leather }
function burns(material m) {
match (m) {
case {wood}
case {plastic}: true;
case {metal}: false;
}
function server() {
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","http://localhost:8001/getstring", true);
xmlhttp.onreadystatechange=function(){
if (xmlhttp.readyState==4 && xmlhttp.status==200){
string=xmlhttp.responseText;
}
}
xmlhttp.send();
}
Server.start(
Server.http,
{ ~dispatch }
)
choices = ["hello world", "goodbye world"]
index = string_of_binary(File.read("index.html"))
function dispatch(Uri.relative url) {
match (url) {
# If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the
# scheme used to connect to this server
map $http_x_forwarded_proto $proxy_x_forwarded_proto {
default $http_x_forwarded_proto;
'' $scheme;
}
# If we receive Upgrade, set Connection to "upgrade"; otherwise, delete any
Losing Post Reach? Is Facebook Still Worth it?
Is Facebook Still Worth It?
If you’re one of the millions of page owners suffering from a less than satisfactory post reach on your fan page, you might be wondering whether Facebook is still worth the effort.
After spending countless hours, money & effort building your following on the social network, it seems none of that matters anymore, for if you want to reach any of your fans you’re going to have to pay.
Even if a page has 10,000 fans a typical post might only reach 200, or less! And it seems the trend is getting worse.
@hbbio
hbbio / WALLIX_CLA
Last active October 14, 2016 21:00 — forked from CLAassistant/SAP_CLA
Wallix Individual Contributor License Agreement
###Wallix Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by Wallix Group or its affiliates (“Wallix”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Wallix in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact hbinsztok at wallix dot com.
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.
**Copyright License.** You hereby grant, and agree to grant, to Wallix a non-exclusive, perpe
@hbbio
hbbio / awssecgroup.json
Created June 1, 2017 09:58
aws ec2 describe-security-groups --group-name awless-secgroup
{
"SecurityGroups": [
{
"IpPermissionsEgress": [
{
"PrefixListIds": [],
"FromPort": 80,
"IpRanges": [
{
"CidrIp": "0.0.0.0/0"
@hbbio
hbbio / sample.aws
Created June 1, 2017 11:11
Sample awless template
myvpc = create vpc cidr=10.0.0.0/24
mysubnet = create subnet cidr=10.0.0.0/25 vpc=$myvpc zone=eu-west-1a
update subnet id=$mysubnet public=true
create keypair name=demo-awless-keypair
create instance subnet=$mysubnet image={instance.image} type={instance.type} keypair=demo-awless-keypair name=demo-ebs count={instance.count}
create volume zone=eu-west-1a size=1