This file contains 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
func offset(tz string) int { | |
if seconds, ok := timeZone[tz]; ok { | |
return seconds | |
} | |
log.Println("unknown time zone:", tz) | |
return 0 | |
} |
This file contains 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
package main | |
import "fmt" | |
type Opicak struct { | |
Name string | |
Age int | |
} | |
func (b Opicak) PrettyName() string { |
This file contains 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
# /root/learning-manifests/break_ssh.pp | |
package { 'openssh-server': | |
ensure => present, | |
before => File['/etc/ssh/sshd_config'], | |
} | |
file { '/etc/ssh/sshd_config': | |
ensure => file, | |
mode => 600, | |
source => '/root/learning-manifests/sshd_config', |
This file contains 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
file {"/tmp/testfile2/yes": | |
ensure => present, | |
content => "well hello there" | |
} | |
file {"/tmp/testfile2": | |
ensure => directory, | |
mode => 0644 | |
} |
This file contains 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
tux@tuxhost /tmp % time ./a.out | |
50005000 | |
./a.out 0.06s user 0.44s system 120% cpu 0.417 total |
This file contains 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
#include <iostream> | |
#include <vector> | |
#include <map> | |
#include <string> | |
#include <thread> | |
int main(int argc, const char** argv) | |
{ | |
std::mutex value_mutex; | |
std::vector<std::thread> threads; |
This file contains 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
#include <iostream> | |
#include <vector> | |
#include <map> | |
#include <string> | |
#include <thread> | |
int main(int argc, const char** argv) | |
{ | |
std::mutex value_mutex; | |
std::vector<std::thread> threads; |
This file contains 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
# Rails 3.2.9 & 3.2.10 | |
irb(main):001:0> Notification::Builder | |
=> ActiveRecord::Associations::Builder | |
irb(main):002:0> 'Notification::Builder'.constantize | |
=> Notification::Builder | |
irb(main):003:0> Notification::Builder | |
=> Notification::Builder | |
# Rails 4.0.0.beta (cb2b4) | |
irb(main):001:0> Notification::Builder |
This file contains 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
tux@tuxhost /tmp/rails-issue-8684 (master) % rails s | |
=> Booting WEBrick | |
=> Rails 4.0.0.beta application starting in development on http://0.0.0.0:3000 | |
=> Call with -d to detach | |
=> Ctrl-C to shutdown server | |
[2013-01-02 15:16:10] INFO WEBrick 1.3.1 | |
[2013-01-02 15:16:10] INFO ruby 1.9.3 (2012-11-10) [x86_64-linux] | |
[2013-01-02 15:16:10] INFO WEBrick::HTTPServer#start: pid=5154 port=3000 | |
NewerOlder