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
| /* | |
| Code for interfacing two Adafruit MMA8451 accelerometers in one arduino via I2C. | |
| Daniel Andrade - www.danielandrade.net | |
| October 2016 | |
| */ | |
| #include <Wire.h> // I2C Wire Library | |
| // Adafruit Libraries | |
| #include <Adafruit_MMA8451.h> // https://github.com/adafruit/Adafruit_MMA8451_Library |
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 | |
| #today variable as YYYY-MM-DD | |
| NOW=$(date +"%Y-%m-%d") | |
| #Upload all files to our dated folder in the selected bucket | |
| gsutil cp /home/backups/files/* gs://bucket-name/$NOW | |
| #Delete all the files after uploading them | |
| rm /home/backups/files/* |
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
| <script type="text/javascript"> | |
| $(document).ready(function(){ | |
| $("div").css("border", "3px solid red"); | |
| }); | |
| </script> |
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
| <?php | |
| //---[BITCOIN DATA]------------------ | |
| $bitcoinURL = "http://api.bitcoincharts.com/v1/weighted_prices.json"; | |
| $bitcoinDATA = json_decode(file_get_contents($bitcoinURL), true); | |
| $bitcoinPRICE = $bitcoinDATA['USD']['24h']; | |
| //---[USD Turismo]------------------- | |
| $usdURL = "http://developers.agenciaideias.com.br/cotacoes/json"; | |
| $usdDATA = json_decode(file_get_contents($usdURL), true); |
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 | |
| for database in $(mysql -e "show databases"|awk -F " " '{print $1}'); do | |
| mysqldump $database | gzip -9 > $database.sql.gz | |
| done |
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
| /* | |
| AD5204 - Arduino Example | |
| www.danielandrade.net - daniel spillere andrade | |
| https://github.com/dansku/ad5204 | |
| June 2014 | |
| */ | |
| #include "SPI.h" // SPI Library | |
| const int CS = 10; // Chip Select For the AD5204 |
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
| find . -name '*.rar' -execdir unrar e '{}' + && find . -name '*.zip' -execdir unzip -tq '{}' + | |
| find . -name '*.rar' -execdir unrar e -o- {} /unrar_to/dir/ \; |
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
| #Makefile | |
| MAIN = blink.c | |
| MCU = atmega32 | |
| F_CPU = 16000000 | |
| BAUD = 9600 | |
| PROGRAMMER_TYPE = usbtiny | |
| ## Defined programs / locations | |
| CC = avr-gcc |