Skip to content

Instantly share code, notes, and snippets.

View abossard's full-sized avatar

Andre Bossard abossard

View GitHub Profile
@abossard
abossard / ing.yaml
Created December 12, 2022 21:37
Example for network policies with ingress
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
spec:
replicas: 3
selector:
matchLabels:
app: myapp
template:
@abossard
abossard / Program.fs
Created July 29, 2021 01:19
Find PS5 and XSX "secret" stock in melectronic stores
open FSharp.Data
type Product = { id: string; name: string }
let products =
[ { id = "785446600000"
name = "XBox Series X" }
{ id = "785445800000"
name = "PlayStation 5 Digital Edition" }
{ id = "785445700000"
@abossard
abossard / azure-storage-blow-up.js
Created April 24, 2017 22:20
let's blow up azure table storage
const R = require('ramda');
const azure = require('azure-storage');
const retryOperations = new azure.ExponentialRetryPolicyFilter();
const tableSvc = azure.createTableService().withFilter(retryOperations);
const data = 'Z'.repeat(64 * 100)
const tableName = 'shibbydatalist'
const defaultEntity = R.range(1, 30).reduce(function (result, bucketNumber) {
result['T' + bucketNumber] = data
return result;
}, {});
@abossard
abossard / ArrayTransform.swift
Created July 25, 2016 14:21 — forked from Jerrot/ArrayTransform.swift
Transform arrays with ObjectMapper to Realm's List type
// Based on Swift 1.2, ObjectMapper 0.15, RealmSwift 0.94.1
// Author: Timo Wälisch <timo@waelisch.de>
import UIKit
import RealmSwift
import ObjectMapper
import SwiftyJSON
class ArrayTransform<T:RealmSwift.Object where T:Mappable> : TransformType {
typealias Object = List<T>
input {
stdin {
type => "stdin-type"
}
syslog {
type => syslog
port => 514
}
file {
type => "syslog"
@abossard
abossard / django_cms_issue_2406_error_500
Created December 17, 2013 08:45
Django CMS issue 2406: maximum recursion depth exceeded in get_available_slug
RuntimeError at /de-ch/admin/cms/page/67/copy-page/
maximum recursion depth exceeded
Request Method: POST
Request URL: http://cms.myproject.com/de-ch/admin/cms/page/67/copy-page/
Django Version: 1.5.5
Python Executable: /home/mycompany/myproject_cms/bin/python
Python Version: 2.7.3
Python Path: ['/home/mycompany/myproject_cms', '/home/mycompany/myproject_cms/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg', '/home/mycompany/myproject_cms/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg', '/home/mycompany/django-myproject_cms', '/home/mycompany/myproject_cms/lib/python2.7', '/home/mycompany/myproject_cms/lib/python2.7/plat-linux2', '/home/mycompany/myproject_cms/lib/python2.7/lib-tk', '/home/mycompany/myproject_cms/lib/python2.7/lib-old', '/home/mycompany/myproject_cms/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/home/mycompany/myproject_cms/local/lib/python2.7/site-packages']
Server time: Di, 17 Dez 2013 08:16:41 +0000
<div id="layout">
<div id="header">HEADER</div>
<div class="side">
<p>SIDE</p>
</div>
<div class="other side">
<p>SIDE 2</p>
</div>
<div id="content">
@abossard
abossard / dabblet.css
Created April 27, 2012 08:35
Autodo ME/US
/**
* Autodo ME/US
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
<link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
<article>
<h1>Andre Bossard</h1>
<p>
<label class="tags">Likes:</label>
<span class="tag">Programming</span>
<span class="tag">Coaching</span>
<span class="tag">Java</span>
@abossard
abossard / .vimrc
Created February 20, 2012 13:47
perfect .vimrc bootstrap
" if you don't start your own .vimrc you probably haven't understand why you should use vim at all.....
" start it and enter :help <RET>