Skip to content

Instantly share code, notes, and snippets.

View kfl62's full-sized avatar
🏠
Working from home

Ferenc-Loránt Kiss kfl62

🏠
Working from home
View GitHub Profile
@kfl62
kfl62 / network.service
Created March 11, 2013 06:42
ArchLinux network.service (dhclient) ipv4, ipv6
[Unit]
Description=Network Connectivity
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-lan0.device
After=sys-subsystem-net-devices-lan0.device
[Service]
Type=oneshot
RemainAfterExit=yes
@joakimk
joakimk / 0_how_to_run.sh
Last active October 11, 2015 18:58
Runnable minimapper example (you just need some version of ruby installed)
# Copy and paste this into a terminal:
gem install minimapper
gem install activemodel # required for Minimapper::Entity[::Rails] (you can use Minimapper::Entity::Core without it)
curl https://gist.github.com/joakimk/3904952/raw/56b592e6eaa5a0206bf9207b0ee53aa0114a53eb/minimapper_example.rb > minimapper_example.rb
ruby minimapper_example.rb
@cameronhunter
cameronhunter / gist:978987
Created May 18, 2011 16:50
I've always liked Ruby's "rescue" keyword. I've implemented something similar in Javascript.
rescue = do(console) ->
(expression, fallback) ->
try expression?() || expression
catch e
console?.warn?( 'Rescued from', e, '. Using fallback value', fallback )
return fallback
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>ul.buttongroup</title>
<style>
ul.buttongroup {
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
display: inline-block;