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
| var HelloMessage = React.createClass({ | |
| render: function() { | |
| return <div>Hello {this.props.name}</div>; | |
| } | |
| }); | |
| React.render(<HelloMessage name="John" />, mountNode); |
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
| package main | |
| import "fmt" | |
| import "net/http" | |
| import "io/ioutil" | |
| import "io" | |
| import "os" | |
| import "strings" | |
| import "code.google.com/p/go.net/html" |
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
| package main | |
| import "fmt" | |
| import "net/http" | |
| import "io/ioutil" | |
| import "io" | |
| import "os" | |
| import "strings" | |
| import "code.google.com/p/go.net/html" |
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
| // Copyright 2012 The Go Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style | |
| // license that can be found in the LICENSE file. | |
| package main | |
| import ( | |
| "bytes" | |
| "encoding/json" | |
| "go/ast" |
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
| - name: Turn off strict host checking so that git checkout works | |
| lineinfile: dest=/etc/ssh/ssh_config regexp='StrictHostKeyChecking\s+no' line='StrictHostKeyChecking no' |
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
| --- | |
| - | |
| hosts: webservers | |
| user: root | |
| vars: | |
| http_port: 80 | |
| max_clients: 200 | |
| tasks: |
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
| # coding: utf-8 | |
| import random | |
| from locust import Locust, TaskSet, task | |
| from pyquery import PyQuery | |
| class WebsiteTasks(TaskSet): | |
| # det här exekveras varje gång Locust skapar en användare | |
| # vi läser in länkar till blogginlägg och nyheter från Creunas hemsida |
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
| # test comment | |
| print 'ok' |
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 | |
| if [[ $# -ne 1 || ! -d $1 ]]; then | |
| echo "Usage: image_compressor.sh [dir]" | |
| exit 1 | |
| fi | |
| # check requirements | |
| for cmd in optipng jpegoptim setfattr |
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 'set' | |
| unless ARGV.length == 1 | |
| puts "usage: display_colors_in_css.rb [css_file]" | |
| exit 1 | |
| end | |
| css = IO.read(ARGV[0]) | |
| color_refs = css.scan /\#[0-9A-Fa-f]{3,6}/ | |
| color_set = Set.new( color_refs.map(&:upcase) ) | |
| puts color_set.to_a.sort |
NewerOlder