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
Do you want know what's the orange color from Bitcoin logo? Here's the colours: | |
Hexadecimal: | |
#FF9900 | |
RGB | |
(255,153,0) | |
Any suggestions are welcome! | |
Fonts: http://www.color-hex.com/color/ff9900 and https://bitcointalk.org/index.php?topic=224522.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
# This method truncate a float / double number. | |
def truncate(number, decimalCases = 2) | |
temp = 1.0 | |
while decimalCases > 0 do | |
temp = temp * 10.0 | |
decimalCases -= 1 | |
end | |
return (number * temp.to_i).floor / temp | |
end |
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
pedido = 1.0 BTC | |
restante = pedido | |
preco_final = R$0.0 | |
# Cuidado que tem que tomar bastante cuidado com os cálculos. Eu por exemplo não verifiquei caso "quantidade + restante >= restante". | |
function iteracoes_sobre_ofertas_de_venda_de_bitcoin(ask): | |
preco = ask.get_preco() | |
quantidade = ask.get_quantidade | |
if (quantidade > restante): | |
preco_final = preco * pedido |
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
// This isn't the final version of the script. The third may be incorrect. | |
iptables -I OUTPUT -p tcp -m tcp --dport 443 -j REJECT --reject-with icmp-port-unreachable // blocking https sites | |
iptables -I OUTPUT -p tcp -m tcp --dport 80 -j REJECT --reject-with icmp-port-unreachableBlock // blocking http sites | |
iptables -A OUTPUT -s 150.162.0.0/16 -j ACCEPT // accepting ips from 150.162.*.* |
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
# | |
# A small guide to install EPOS (Embedded Parallel Operating System) in your Fedora 22. | |
# http://www.lisha.ufsc.br | |
# | |
# Feel free to ask for help or improve the guide. | |
# | |
# References: | |
# http://www.lisha.ufsc.br/teaching/dos/epos_quick_start.html | |
# https://epos.lisha.ufsc.br/EPOS+User+Guide#EPOS_User_Guide | |
# |
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
#!/bin/sh | |
# Install Spark on Fedora 22. | |
# Written by Fernando Paladini on 09/15/2015. | |
arch=$(uname -m) | |
mkdir $HOME/iot | |
cd $HOME/iot | |
# Installing and configuring Oracle JDK 8. | |
if [ "$arch" == "x86_64" ] |
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
#!/bin/sh | |
# Remove Spark from Fedora 22. | |
# Written by Fernando Paladini on 09/15/2015. | |
# Removing Oracle JDK 8. | |
printf "\n\n[LOG] Removing Java on 'alternatives'\n\n" | |
sudo alternatives --remove java /usr/java/latest/jre/bin/java | |
sudo alternatives --remove javaws /usr/java/latest/jre/bin/javaws | |
sudo alternatives --remove javac /usr/java/latest/bin/javac |
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
https://youtu.be/1OEu9C51K2A |
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
11-16|16:03:53.373 [main] INFO [TelnetServerModule.java:42] - Configuring module TelnetServerModule | |
11-16|16:03:54.255 [main] INFO [StdSchedulerFactory.java:1175] - Using default implementation for ThreadExecutor | |
11-16|16:03:54.270 [main] INFO [SchedulerSignalerImpl.java:61] - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl | |
11-16|16:03:54.271 [main] INFO [QuartzScheduler.java:243] - Quartz Scheduler v.2.1.7 created. | |
11-16|16:03:54.272 [main] INFO [RAMJobStore.java:154] - RAMJobStore initialized. | |
11-16|16:03:54.273 [main] INFO [QuartzScheduler.java:268] - Scheduler meta-data: Quartz Scheduler (v2.1.7) 'QuartzScheduler' with instanceId 'NON_CLUSTERED' | |
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally. | |
NOT STARTED. | |
Currently in standby mode. | |
Number of jobs executed: 0 |
OlderNewer