Skip to content

Instantly share code, notes, and snippets.

View gertcuykens's full-sized avatar

Gert Cuykens gertcuykens

  • belgium
View GitHub Profile
@gertcuykens
gertcuykens / .bash_profile
Last active January 18, 2019 05:11
shell
#!/bin/bash
if [ -r ~/.bashrc ]; then
. ~/.bashrc
fi
@gertcuykens
gertcuykens / Gruntfile.js
Created September 26, 2014 19:08
Gruntfile.js
'use strict';
module.exports = function (grunt) {
grunt.initConfig({
gae: {
run: {
action: 'run',
options: {async:true, asyncOutput: true} //path
@gertcuykens
gertcuykens / wget.sh
Created August 22, 2014 08:38
wget.sh
xcode-select --install
curl -O http://ftp.gnu.org/gnu/wget/wget-1.15.tar.gz
./configure --with-ssl=openssl
wget --mirror --convert-links --adjust-extension --page-requisites --no-parent http://example.org
wget -mkEp -np http://example.org
--convert-links – convert all the links (also to stuff like CSS stylesheets) to relative, so it will be suitable for offline viewing.
--page-requisites – Download things like CSS style-sheets and images required to properly display the page offline.
--no-parent – When recursing do not ascend to the parent directory. It useful for restricting the download to only a portion of the site.
#!/bin/bash
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
@gertcuykens
gertcuykens / main.m
Last active August 29, 2015 14:01
objective-c
#import <objc/Object.h>
#import <stdio.h>
@class Person;
typedef void(^function)();
static NSString *loadingText = @"Loading...";
@protocol Person
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
)
/* Copyright (c) 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
application: ...
version: 0
runtime: go
api_version: go1
threadsafe: true
handlers:
- url: /css
static_dir: home/css
<static-files>
<include path="/my_static-files" >
<http-header name="Access-Control-Allow-Origin" value="http://example.org" />
</include>
</static-files>
<security-constraint>
<web-resource-collection>
<web-resource-name>profile</web-resource-name>
<url-pattern>/profile/*</url-pattern>
@gertcuykens
gertcuykens / crossdomain.xml
Created November 16, 2013 21:46
crossdomain.xml
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" to-ports="*" secure="false"/>
<allow-http-request-headers-from domain="*" headers="*" secure="false"/>
</cross-domain-policy>