Skip to content

Instantly share code, notes, and snippets.

View marcoceppi's full-sized avatar
.

Marco Ceppi marcoceppi

.
View GitHub Profile
variant: fcos
version: 1.4.0
storage:
directories:
- path: /etc/ucore-autorebase
mode: 0754
systemd:
units:
- name: ucore-unsigned-autorebase.service
enabled: true
format = """
$username\
$hostname\
$kubernetes\
$git_branch\
$git_commit\
$git_state\
$git_status\
$hg_branch\
$docker_context\
format = """
$username\
$hostname\
$kubernetes\
$git_branch\
$git_commit\
$git_state\
$git_status\
$hg_branch\
$docker_context\
<?php
session_start();
$si_prefix = array( 'B', 'KB', 'MB', 'GB', 'TB', 'EB', 'ZB', 'YB' );
$base = 1024;
if( !is_array($_SESSION['speed']) )
{
$_SESSION['speed'] = array('updated' => time(), 'old' => file_get_contents('/sys/class/net/eth0/statistics/rx_bytes'));
@marcoceppi
marcoceppi / gitlab_html.rb
Created July 2, 2012 16:00
Readme, wiki, and others choke when using code blocks.
--- a/lib/redcarpet/render/gitlab_html.rb
+++ b/lib/redcarpet/render/gitlab_html.rb
@@ -3,7 +3,7 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
if Pygments::Lexer.find(language)
Pygments.highlight(code, :lexer => language, :options => {:encoding => 'utf-8'})
else
- Pygments.highlight(code, :options => {:encoding => 'utf-8'})
+ Pygments.highlight(code, :lexer => 'bash', :options => {:encoding => 'utf-8'})
end
end
name: k8s
config:
boot.autostart: "true"
linux.kernel_modules: ip_tables,ip6_tables,netlink_diag,nf_nat,overlay
raw.lxc: |
lxc.aa_profile=unconfined
lxc.mount.auto=proc:rw sys:rw
security.nesting: "true"
security.privileged: "true"
description: ""
class ExponentialBackoff:
def __init__(self, base=1, integral=False):
self._base = base
self._exp = 0
self._max = 10
self._reset_time = base * 2 ** 11
self._last_invocation = time.monotonic()
r = random.Random()
@marcoceppi
marcoceppi / cdk.package.list
Last active May 23, 2018 15:33
CDK Package list as of 1.10.2
accountsservice
acl
acpid
adduser
apparmor
apport
apport-symptoms
apt
apt-transport-https
apt-utils
@marcoceppi
marcoceppi / rancher.yaml
Created December 6, 2017 18:10
Run rancher 2.0 preview on Kubernetes
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: rancher
name: rancher-server
namespace: kube-system
spec:
replicas: 1
selector:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: microbot
name: microbot
spec:
replicas: 5
selector: