- 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
| #!/bin/bash | |
| # holt alle Umgebungsvariablen fuer Oracle | |
| source /etc/profile.d/oracle.sh | |
| export PATH=/usr/local/bin:$PATH | |
| source /home/nmaef/.password/ldap.bash | |
| source /home/nmaef/.password/umt.bash | |
| source /home/nmaef/.password/pg_zuv.bash |
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
| #!/bin/bash | |
| export LDAP_USER="cn=halli,ou=galli,o=super,c=beispiel" | |
| export LDAP_PASSWORD="SuperGeheimSageIchKeinem" | |
| export LDAP_SERVER="ldap.irgendwo.uni-halle.de" | |
| export LDAP_SERVER_PORT=389 |
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
| select distinct | |
| pgd.pgd_name Nachname | |
| ,pgd.pgd_vorname Vorname | |
| ,case pgd.pgd_geschlecht | |
| when 'M' then 'Herr' | |
| when 'W' then 'Frau' | |
| else 'Herr/Frau' | |
| end Geschlecht | |
| ,a.druck_anredetitelm Titel | |
| ,institut.text_institut Einrichtung |
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') |
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
| 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
| #!/usr/bin/env ruby | |
| # encoding: utf-8 | |
| require 'net/ldap' | |
| require 'awesome_print' | |
| require 'csv' | |
| def fetch_from_ldap uid | |
| connect_ldap |
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
| 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 |