This is a collection of information on Facebooks CTF release on Github.
The idea is to create an ARM compatible release of the project that should be useable on Raspberry Pi systems.
Facebook CTF is available at /facebook/fbctf.
from gpiozero import DistanceSensor | |
from gpiozero import LED | |
requirement = int(raw_input('Input required distance in [cm]: ')) | |
led = LED(5) | |
sensor = DistanceSensor(echo=18, trigger=17) | |
while True: | |
distanceRead = sensor.distance * 100 | |
print('Distance: ', distanceRead) | |
if distanceRead >= requirement: |
This is a collection of information on Facebooks CTF release on Github.
The idea is to create an ARM compatible release of the project that should be useable on Raspberry Pi systems.
Facebook CTF is available at /facebook/fbctf.
#!/bin/bash | |
# | |
# /etc/rc.d/init.d/gogs | |
# | |
# Runs the Gogs Go Git Service. | |
# | |
# | |
# chkconfig: - 85 15 | |
# |
filenames = ['/etc/os-release'] # add any other distro locations for os-release | |
def read_release(): | |
for filename in filenames: | |
if os.path.isfile(filename): | |
with open('/etc/os-release', 'r') as relfile: | |
for line in relfile: | |
if('NAME ' in line): | |
release_dict(line.split(' ')[1]) |
#Download Elementary OS from here: | |
#http://elementary.io | |
#First you update your system | |
sudo apt-get update && sudo apt-get dist-upgrade | |
#Install Google Chrome | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' |
// Bonfire: Check for Palindromes | |
// Author: @mtroiani | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-check-for-palindromes | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function palindrome(str) { | |
str = str.toLowerCase().replace(/[^\w]|_/g, ""); | |
return (str === str.split("").reverse().join("")); | |
} |
This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
###Array ####Definition: