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
By Klaus Wuestefeld | |
1) Torne-se excelente. | |
Seja realmente bom em alguma coisa. Não fique só choramingando ou | |
querendo progredir às custas dos outros. Não pense q pq vc sentou 4 | |
anos numa faculdade ouvindo um professor falar sobre software q vc | |
sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo | |
aula. Ele pratica. Instrumentistas geniais nao aprendem a tocar tendo | |
aula. Eles praticam. Pratique. Chegue em casa depois do trabalho e da |
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
Instalação do Ruby 1.8/Rails 3 usando o RVM no Ubuntu | |
1) Colar essa linha no terminal (bash) | |
$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)l libssl-dev libreadline5-dev zlib1g-dev | |
2) Instalar a versão 1.8.7 do ruby com | |
$ rvm install 1.8.7 |
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
Section "Monitor" | |
Identifier "Configured Monitor" | |
EndSection | |
Section "Screen" | |
Identifier "Default Screen" | |
Monitor "Configured Monitor" | |
Device "Configured Video Device" | |
EndSection |
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
import urlparse | |
import oauth2 as oauth | |
import requests | |
# First of all fill in your consumer key and secret you get when | |
# you create your application at Redu | |
consumer_key = 'YOUR_CONSUMER_KEY_HERE' | |
consumer_secret = 'YOUR_CONSUMER_SECRET_HERE' |
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
<?php | |
// this script requires the instalation of the Oauth library | |
// http://br.php.net/manual/en/book.oauth.php | |
$api_url = 'http://www.redu.com.br/api'; | |
$authorize_url = 'http://www.redu.com.br/oauth/authorize'; | |
$request_token_url = 'http://www.redu.com.br/oauth/request_token'; | |
$access_token_url = 'http://www.redu.com.br/oauth/access_token'; | |
$consumer_key = 'PUT_YOUR_CONSUMER_KEY_HERE'; |
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.fire(); |
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
text = "Lorem ipsum dolor sit amet, vix agam noluisse inciderint ea, ex augue iriure invidunt nec. Discere epicuri vim in, et delenit molestie adolescens eam. Ei pericula explicari principes nec, solum salutatus intellegam ei sed. Ei vix stet debet vocibus. Pri viris aperiri periculis ei, pri vocibus tacimates id." | |
text.scan(/.{1,25}\b|.{1,25}/).map(&:strip) | |
# => ["Lorem ipsum dolor sit", "amet, vix agam noluisse", "inciderint ea, ex augue", "iriure invidunt nec.", "Discere epicuri vim in,", "et delenit molestie", "adolescens eam. Ei", "pericula explicari", "principes nec, solum", "salutatus intellegam ei", "sed. Ei vix stet debet", "vocibus. Pri viris", "aperiri periculis ei, pri", "vocibus tacimates id", "."] |
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
# other stuff... | |
after_action :set_cors_headers # use after_filter if Rails < 4 | |
def set_cors_headers | |
headers['Access-Control-Allow-Origin'] = "*" | |
headers['Access-Control-Request-Method'] = %w{GET POST OPTIONS}.join(",") | |
end | |
# other stuff... |
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
1. go to https://sslvpn.demo.sonicwall.com/cgi-bin/welcome | |
2. log in with demo/password | |
3. click on NetExtender icon, this will download a tar.gz with the client | |
4. sudo ln -s /lib/x86_64-linux-gnu/libssl.so.1.0.0 /usr/lib/libssl.so.6 | |
5. sudo ln -s /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.6 | |
6. un-tar the client, make install script executable and launch install |
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
# We actually don't need to do that. | |
# Even if the branches are very different and you don't wanto resolve a ton of conflicts. | |
# Using the strategy argument in the merge command, you can instruct git to just use | |
# tha state in the current branch and do the merge, preserving all the history. | |
git checkout alternate_branch | |
git merge --strategy=ours master # keep the content of this branch, but record a merge | |
git checkout master | |
git merge alternate_branch # fast-forward master up to the merge | |
# Now you can delete the alternate_branch and go back to using master. |
OlderNewer