Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Restoring a VW, apartment EDM club, letsgo powered paragliding

Barry Allard steakknife

💭
Restoring a VW, apartment EDM club, letsgo powered paragliding
View GitHub Profile
@steakknife
steakknife / Makefile
Last active Jun 11, 2020 — forked from RadNi/lwnfs.c
Updated lwnfs
View Makefile
obj-m := lwnfs.o
lwn-objs := lwnfs.o
all: ko
ko:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
@steakknife
steakknife / install-latest-ruby-on-centos-7.sh
Last active Mar 19, 2020 — forked from mustafaturan/ruby.2.6.3-setup.sh
ruby latest setup for centos 7.x
View install-latest-ruby-on-centos-7.sh
#!/usr/bin/env bash
set -ex
toolset=devtoolset-7
yum install -y epel-release # EPEL repo
yum install -y centos-release-scl # shiny-new(er) compliers
# make sure there are no surprises installing from repos
grep -r gpgkey= /etc/yum.repos.d/ | cut -d= -f2 | xargs -L1 rpm --import
yum update -y # system update
# misc dev tools, but we're not going to use the ancient toolchain
View rust-in-large-organizations-notes.md

Rust in Large Organizations

Initially taken by Niko Matsakis and lightly edited by Ryan Levick

Agenda

  • Introductions
  • Cargo inside large build systems
  • FFI
  • Foundations and financial support
View tiger-vnc.rb
class TigerVnc < Formula
homepage "http://tigervnc.org/"
url "https://github.com/TigerVNC/tigervnc/archive/v1.6.0.tar.gz"
sha256 "98ffe98fcfe883e6c35aec579295b53d73d2ccf62e0f6e53a73ecad993b096ca"
depends_on "cmake" => :build
depends_on "gnutls" => :recommended
depends_on "jpeg-turbo"
depends_on "gettext"
depends_on :x11
@steakknife
steakknife / action_dispatch_extensions.rb
Last active May 9, 2018 — forked from tokland/action_dispatch_extensions.rb
How to add locale scope to i18n_routing
View action_dispatch_extensions.rb
class ActionDispatch::Routing::Mapper
def localize_and_scope_for(locales, options = {}, &block)
skip_scope = options[:skip_scope]
locales = locales.dup
locales.delete skip_scope
scope("/:locale", :constraints => {:locale => /#{locales.join('|')}/}) do
yield
end
yield if skip_scope
end
@steakknife
steakknife / docker-ssl-cert-generate
Last active Oct 24, 2017 — forked from cameron/docker-ssl-cert-generate
Generate self-signed SSL certs for docker client <— HTTPS (verified!)—> daemon
View docker-ssl-cert-generate
#! /bin/bash
set -e
echo 01 > ca.srl
openssl genrsa -out ca-key.pem
cat << CNF > ca.cnf
req_extensions = v3_req
[ req ]
distinguished_name = req_distinguished_name
@steakknife
steakknife / LICENSE
Created May 21, 2017 — forked from sinisterchipmunk/LICENSE
tar, gzip, and untar files using ruby in memory without tempfiles
View LICENSE
Copyright (C) 2011 by Colin MacKenzie IV
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
View resizer.sh
#!/bin/bash -e
# Make sure you have installed ImageMagick
# http://cactuslab.com/imagemagick/
# Ensure we're running in location of script.
cd "`dirname $0`"
for f in *; do
if [[ $f == *@3x* ]];
then
@steakknife
steakknife / python3.rb
Created May 18, 2013 — forked from anonymous/python3.rb
brew formula for python 3.3.2
View python3.rb
require 'formula'
# Python3 is the new language standard, not just a new revision.
# It's somewhat incompatible with Python 2.x, therefore, the executable
# "python" will always point to the 2.x version which you can get by
# `brew install python`.
class Distribute < Formula
url 'https://pypi.python.org/packages/source/d/distribute/distribute-0.6.40.tar.gz'
sha1 '46654be10177014bbb502a4c516627173de67d15'
@steakknife
steakknife / to_boolean.rb
Created Apr 28, 2012 — forked from gmgent/to_bool.rb
a better to_boolean
View to_boolean.rb
module Kernel
def to_boolean(nil_value = nil)
value = self.is_a?(String) ? self.downcase : self
case value
when "off", "no", "n", "false", "f", "0", "-", false, 0, "negative"
false
when "on", "yes", "y", "true", "t", "1", "+", true, 1, "affirmative"
true
else
nil_value