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 / designer.html
Created August 17, 2014 18:51
designer
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="trst-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@kfl62
kfl62 / do_not_log.conf
Created July 21, 2013 16:43
nginx configuration file, (do not log robots.txt and favicon.ico requests)
# Designed to be included in any server {} block.
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
@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
@kfl62
kfl62 / Rakefile
Created April 16, 2012 10:17
Logging mongoid in Sinatra
desc "Irb with DB environment loaded"
task :console do
require './config/database'
require "irb"
ARGV.clear
IRB.start
end
@kfl62
kfl62 / mongoid_sort_habtm.rb
Last active October 3, 2015 01:38
HABTM relations return docs in the wrong order
class Some
include Mongoid::Document
field :some_field
has_and_belongs_to_many :habtms
def sorted_habtms
hbtm_ids.each_with_object([]){|id,a| h = habtms.find(id); a << h}
end
@kfl62
kfl62 / .zlogin
Created November 11, 2011 06:51
zsh settings
# go to saved path if there is one
if [[ -f ~/.current_path~ ]]; then
cd `cat ~/.current_path~`
rm ~/.current_path~
fi
+/bin/zsh:1> rvm --trace get head
+rvm:2> local result current_result
+rvm:4> [[ -z 4.3.12 ]]
+rvm:10> [[ 3 -gt 0 ]]
+rvm:10> next_token=--trace
+rvm:10> shift
+rvm:12> __rvm_cleanse_variables
+__rvm_cleanse_variables:2> __rvm_unset_ruby_variables
+__rvm_unset_ruby_variables:3> unset rvm_env_string rvm_ruby_string rvm_ruby_strings rvm_ruby_binary rvm_ruby_gem_home rvm_ruby_gem_path rvm_ruby_home rvm_ruby_interpreter rvm_ruby_irbrc rvm_ruby_log_path rvm_ruby_major_version rvm_ruby_minor_version rvm_ruby_package_name rvm_ruby_patch_level rvm_ruby_release_version rvm_ruby_repo_url rvm_ruby_repo_branch rvm_ruby_revision rvm_ruby_selected_flag rvm_ruby_tag rvm_ruby_version rvm_ruby_load_path rvm_ruby_require rvm_head_flag rvm_ruby_package_file rvm_ruby_configure rvm_ruby_name rvm_ruby_url rvm_ruby_global_gems_path rvm_ruby_args rvm_ruby_name rvm_llvm_flag rvm_architectures
+__rvm_cleanse_variables:4> [[ 0 -eq 1 ]]
@kfl62
kfl62 / MPD-DBus-Kopete_01.sh
Created October 26, 2010 16:44
HowTo for install ruby-dbus
git clone git://github.com/mvidner/ruby-dbus.git
cd ruby-dbus
rake gem
# choose your install method rvm gem install|gem install|sudo gem install
rvm gem install pkg/ruby-dbus-version.gem
@kfl62
kfl62 / nice-buttons.sass
Created October 22, 2010 11:28
bomberstudio's gist <http://gist.github.com/638822> on dark background using Sass & Compass
// just playing with [bomberstudio's gist](http://gist.github.com/638822)
@import compass/css3
.buttongroup
ul
+border-radius(3px)
border: 1px solid rgba(160,160,160,1)
clear: both
font:
family: Arial, sans-serif
size: 13px
#workflow for staicmatic
cd ~/work/electrowerk_static
# start webserver
staticmatic preview .
# work on src/ haml ors sass files
# start chrome/firefox any browser and point to http://locahost:3000
# check what you done, if you like it
Ctrl C # in terminal where you started the webserver
staicmatic build .
# builds generated files in site/ directory