Skip to content

Instantly share code, notes, and snippets.

View bascht's full-sized avatar
📢
Setting all the statuses.

Sebastian Schulze bascht

📢
Setting all the statuses.
View GitHub Profile
$ pip install --user passpie
Downloading/unpacking passpie
Could not find a version that satisfies the requirement passpie (from versions: 0.1rc1, 0.1rc2, 0.1rc3, 0.1rc4, 0.1rc5, 0.1rc6)
Cleaning up...
No distributions matching the version for passpie
Storing complete log in /home/bascht/.pip/pip.log
generic::variable: 'value'
some_class::myvar: '%{generic::variable}'
other_class::myvar: '%{generic::variable}'
struct Record {
company: String,
address: String,
email: String,
}
impl ToString for Record {
fn to_string(&self) -> String {
let mut slice = self.company.clone().truncate(3);
return slice;
glasses = Exception
def your(what); what end
begin
raise your glasses
rescue glasses => e
puts "You could have recycled this #{e}!"
end
@bascht
bascht / throw.rb
Last active August 29, 2015 14:20
begin
puts "All is well"
class DiesenErrorGibtEsHierNicht < Exception; end
throw DiesenErrorGibtEsHierNicht
rescue DiesenErrorGibtEsHierNicht => e
puts "Well."
end
:eins:
:hostname: eins.blub.local
:box: my/customer/box-eins
:memory: 1536
:box_version: ' ~> 1.1.146'
:sync:
'first':
target: /var/www/some/files
'second':
target: /var/build
def mount(folders)
folders.map do |name, options|
check_compatibility!
folder(name, options)
end
end
[1] pry(main)> def name(first, last, &blub)
[1] pry(main)* def return; end
[1] pry(main)* "#{first} #{last}"
[1] pry(main)* end
=> :name
[24] pry(main)> first = "First"
=> "First"
[25] pry(main)> last = "Last"
=> "Last"
[26] pry(main)> name(first, last) {
[26] pry(main)* return `${first} ${last}`
[26] pry(main)* }
=> "First Last"
@bascht
bascht / foo.yml
Last active August 29, 2015 14:19
dings:
eins: &eins
some: property
zwei: &zwei
some: otherproperty
bums:
eins: *eins
zwei: *zwei