- git-core (ppa:git-core/ppa)
- ag (silversearcher-ag)
- neovim (ppa:neovim-ppa/unstable)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lsb_release -a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'dotenv-rails' | |
gem 'rails', '4.1.6' | |
gem 'pg' | |
gem 'uglifier', '>= 1.3.0' | |
gem 'coffee-rails', '~> 4.0.0' | |
# gem 'therubyracer', platforms: :ruby |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Quelle: http://anthonylewis.com/2011/02/09/to-hex-and-back-with-ruby/ | |
Base64.decode64('ZNgCF5auf9KN/PzwpUaxKyvLAtU=').each_byte.map{ |b| b.to_s(16) }.join |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
require 'net/ldap' | |
require 'awesome_print' | |
require 'csv' | |
def fetch_from_ldap uid | |
connect_ldap |
- hello world
- hello World
- hallo world
- Hello Welt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/ldap' | |
ldap = Net::LDAP.new | |
ldap.host = your_server_ip_address | |
ldap.port = 389 | |
ldap.auth "joe_user", "opensesame" | |
if ldap.bind | |
# authentication succeeded | |
else | |
# authentication failed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
basedn = "uid=foo,ou=bar,c=baz" | |
attrs = ["mail", "cn", "sn", "objectclass"] | |
ldap.search(:base => basedn, :attributes => attrs) do |entry| | |
puts "DN: #{entry.dn}" | |
entry.each do |attr, values| | |
puts "#{attr}:" | |
values.each do |value| | |
puts "#{value}" | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |