Skip to content

Instantly share code, notes, and snippets.

View kdwinter's full-sized avatar

Kenneth De Winter kdwinter

  • Belgium
  • 03:59 (UTC +02:00)
View GitHub Profile
== Admin Commands
disableoutput <int> -> getnone
enableoutput <int> -> getnone
kill -> None
update [<str>] -> getitem
== Informational Commands
status -> getobject
stats -> getobject
outputs -> getoutputs
commands -> getlist
# Ruby-based configuration file for wmii.
require 'rubygems'
################################################################################
# GENERAL CONFIGURATION
################################################################################
module Key
MOD = 'Mod4'
UP = 'k'
IO.popen('gist', 'w') do |g|
g.puts File.read(__FILE__)
end
#!/usr/bin/env ruby19
@paclist = `pacman -Qqe | grep -v "$(pacman -Qmp)"`
@listfile = ENV['HOME'] + '/abs/paclist.txt'
File.open(@listfile, 'w+') do |f|
f.puts f.atime
f.puts
f.puts @paclist
end
#!/usr/bin/env ruby19
# encoding: utf-8
require 'fileutils'
module ToGit
Gitdir = File.join( ENV['HOME'], 'github/dotfiles' )
class << self
Git = lambda { |command, dir| `git --git-dir=#{dir}/.git #{command}` }
#!/usr/bin/env ruby19
# encoding: utf-8
require 'fileutils'
module ToGit
Gitdir = File.join( ENV['HOME'], 'github/dotfiles' )
class << self
Git = lambda { |command, dir| `git --git-dir=#{dir}/.git #{command}` }
#!/usr/bin/env ruby19
# encoding: utf-8
require 'fileutils'
module ToGit
Gitdir = File.join( ENV['HOME'], 'github/dotfiles' )
class << self
Git = lambda { |command, dir| `git --git-dir=#{dir}/.git #{command}` }
#!/usr/bin/env ruby19
# encoding: utf-8
require 'fileutils'
module ToGit
Gitdir = File.join( ENV['HOME'], 'github/dotfiles' )
class << self
Git = lambda { |command, dir| `git --git-dir=#{dir}/.git #{command}` }
puts 'How many numbers do you want?'
numbers = $stdin.gets.chomp
(1..numbers.to_i).each do |l|
puts "The element is #{l}"
end
#!/bin/sh
# wifiscan
# Wireless interface
iface='wlan0'
# Extract info and format the output
(echo ESSID~~~Channel~~~Quality~~~Encryption && \
echo "---~~~---~~~---~~~---" && \
iwlist $iface scan | \