Skip to content

Instantly share code, notes, and snippets.


Duke dukex

View GitHub Profile

Keybase proof

I hereby claim:

To claim this, I am signing this object:

dukex /
Last active Jan 5, 2019
Docker cerbot
docker run -it --rm \
-v /etc/letsencrypt:/etc/letsencrypt \
-v /var/lib/letsencrypt:/var/lib/letsencrypt \
-v /var/www/letsencrypt:/var/www/letsencrypt \
-v "/var/log/letsencrypt:/var/log/letsencrypt" \
certbot/certbot \
certonly --webroot \
--register-unsafely-without-email --agree-tos \
--webroot-path=/var/www/letsencrypt \
View linearregression.rb
# Adapted from a C# example here:
# And thanks to John Esser for helping figure out how to
# calculate the targets to stabilize a negative slope!
class LinearRegression
attr_accessor :slope, :intercept
# Pass in an array of values to get the regression on
dukex / -etc-NetworkManager-NetworkManager.conf
Created Mar 11, 2018
.dev domain resolving to [Arch]
View -etc-NetworkManager-NetworkManager.conf
# Configuration file for NetworkManager.
# See "man 5 NetworkManager.conf" for details.
View tagged_worker_tracer.rb
# frozen_string_literal: true
module MyApp
module TaggedWorkerTracer
extend ActiveSupport::Concern
attr_reader :metadata, :delivery_info,
:routing_key, :correlation_id, :customer_id,
View gist:41f5eaa100eefa8d2d6323210cebde29
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:ro -v /var/lib/docker:/var/lib/docker martin/docker-cleanup-volumes
dukex /
Created Feb 13, 2017 — forked from jackbillstrom/
The magic timetraveler script for Sketch trial
echo "Traveling back in time..."
date 0318125013
echo "Opening Sketch..."
open -a Sketch
echo "Traveling to present time..."
ntpdate -u
echo "Done..."
exit 0
branch_name=$(git branch | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1/")
echo "Removing old cordova directory"
rm -rf cordova
echo "Creating cordova app to ${branch_name}..."
echo "WARNING: say 'no' to the next prompts"
ember generate cordova-init "${branch_name}" --platform=android
dukex / 5.c
Last active Sep 7, 2015 — forked from anonymous/5.c
Avaliação 1
View 5.c
#include <stdio.h>
int main(int argc, char const *argv[]) {
int a, b, temp;
scanf("%d", &a);
scanf("%d", &b);
temp = a;
a = b;
b = temp;
printf("\n Agora a=%d e b=%d\n", a, b);
View admin.js
import Ember from 'ember';
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
export default Ember.Route.extend(AuthenticatedRouteMixin, {
session: Ember.inject.service('session')
beforeModel() {
const userType = this.get('session.authenticated.type');
if(userType !== 'admin') {