Skip to content

Instantly share code, notes, and snippets.

View enricostano's full-sized avatar

Enrico Stano enricostano

View GitHub Profile
abr 20 17:03:26 archlap systemd[1]: Started Locale Service.
abr 20 17:04:57 archlap gnome-session[2152]: WARNING: Application 'i3-gnome.desktop' failed to register before timeout
abr 20 17:04:57 archlap gnome-session[2152]: Unrecoverable failure in required component i3-gnome.desktop
abr 20 17:04:57 archlap gnome-session[2152]: gnome-session[2152]: WARNING: Application 'i3-gnome.desktop' failed to register before timeout
abr 20 17:04:57 archlap gnome-session[2152]: Entering running state
abr 20 17:04:57 archlap gnome-session[2152]: Failed to play sound: File or data not found
abr 20 17:05:09 archlap gnome-session[2152]: gnome-session[2152]: GLib-GObject-CRITICAL: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
abr 20 17:05:09 archlap gnome-session[2152]: GLib-GObject-CRITICAL: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
abr 20 17:05:09 archlap gnome-session[2152]: GLib-GObject-CRITICAL: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
abr 20 17:05:09 archlap gnome-session[2152]: gno
@enricostano
enricostano / dhcpcd.conf
Created April 3, 2015 14:01
/etc/dhcpcd.conf
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.
# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel
# Inform the DHCP server of our hostname for DDNS.
hostname
# Use the hardware address of the interface for the Client ID.
@enricostano
enricostano / eth0.network
Created April 3, 2015 13:58
/etc/systemd/network/eth0.network
[Match]
Name=eth0
[Network]
DHCP=v4
dic 10 23:16:51 alarmpi systemd[1]: Started Network Service.
dic 10 23:16:51 alarmpi kernel: smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
dic 10 23:16:51 alarmpi kernel: IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
dic 10 23:16:51 alarmpi systemd-logind[136]: New seat seat0.
dic 10 23:16:51 alarmpi systemd[1]: Started Login Service.
dic 10 23:16:51 alarmpi systemd[1]: Starting Network.
dic 10 23:16:51 alarmpi systemd[1]: Reached target Network.
dic 10 23:16:51 alarmpi systemd[1]: Starting OpenSSH Daemon...
dic 10 23:16:51 alarmpi systemd[1]: Started OpenSSH Daemon.
dic 10 23:16:51 alarmpi systemd[1]: Starting Network Name Resolution...
λ sudo strings root/var/log/journal/321b13bd037b4883b3d2208a2f376f0e/system.journal | grep -i eth0
MESSAGE=smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
MESSAGE=IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
MESSAGE=smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
MESSAGE=IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
INTERFACE=eth0
MESSAGE=eth0 : gained carrier
MESSAGE=eth0 : lost carrier
MESSAGE=smsc95xx 1-1.1:1.0 eth0: link down
MESSAGE=smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:23:b2:23
@enricostano
enricostano / lazyness.rb
Last active August 29, 2015 14:14
lazy iterator
arr = [1, 2, 3, 4, 5, 6, 7, 8]
[
[1, 2, 3, 4, 5],
[2, 3, 4, 5, 6],
[3, 4, 5, 6, 7],
[4, 5, 6, 7, 8],
[5, 6, 7, 8],
[6, 7, 8],
[7, 8],
SELECT users.id FROM users WHERE users.id IN (SELECT m2.user_id FROM memberships AS m1 INNER JOIN memberships AS m2 ON (m1.user_id = 3 AND m2.group_id = m1.group_id));
SELECT users.id FROM users INNER JOIN memberships AS m1 ON (users.id = m1.user_id) INNER JOIN memberships AS m2 ON (m1.group_id = m2.group_id) WHERE m2.user_id = 3;
@enricostano
enricostano / foo_bar.rb
Created August 22, 2014 13:03
Ruby class variables
class FooBar
class << self
attr_accessor :variabile
def hola
p variabile
end
'use strict';
require("../../lib/bootstrap-3.1.1-dist/css/bootstrap.css");
require("../styles/main.css");
require("imports?jQuery=jquery!../../lib/bootstrap-3.1.1-dist/js/bootstrap.js");
var Backbone = require("backbone")
, Marionette = require("backbone.marionette")
, headerLayoutTemplate = require("../templates/header.handlebars")
, Katuma = new Marionette.Application({});
module Alfa
def self.included(base)
puts "#{self} included in #{base}"
unless base.const_defined?(:PAPPA)
base.const_set :PAPPA, [:a, :b]
end
end
def self.extended(base)
puts "#{self} extended in #{base}"