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
# paste line by line into the right console | |
sudo su postgres | |
psql -d template1 | |
ALTER USER postgres WITH PASSWORD 'newpass'; |
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
#add this to fstab | |
/var/www/ /home/luan/www none rw,bind 0 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
Show hidden characters
{ | |
"font_size": 9, | |
"highlight_line": true, | |
"shift_tab_unindent": true, | |
"default_line_ending": "unix", | |
"ensure_newline_at_eof_on_save": true, | |
"trim_trailing_white_space_on_save": true, | |
"translate_tabs_to_spaces": true, | |
"word_wrap": false, | |
} |
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/bash | |
adduser $1 | |
usermod -s /usr/lib/sftp-server $1 |
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
#!/usr/bin/python | |
# based on http://www.netfluvia.org/layer8/?p=175 | |
import mechanize | |
import json | |
import time | |
class Cosm: | |
_url_base = "http://api.cosm.com/v2/feeds/" |
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
#!/usr/bin/python | |
# based on http://www.netfluvia.org/layer8/?p=175 | |
import mechanize | |
import json | |
import os | |
import serial | |
class Cosm: |
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
Port 8090 # Port to bind the server to | |
BindAddress 0.0.0.0 | |
MaxHTTPConnections 2000 | |
MaxClients 1000 | |
MaxBandwidth 10000 # Maximum bandwidth per client | |
# set this high enough to exceed stream bitrate | |
CustomLog - | |
NoDaemon # Remove this if you want FFserver to daemonize after start | |
<Feed feed1.ffm> # This is the input feed where FFmpeg will send |
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/bash | |
TIMESTAMP=$(date +"%Y-%m-%d_%T") | |
FILE="/home/pi/timelapse/$TIMESTAMP.jpg" | |
EX="beach" | |
ISO="100" | |
HOUR=$(date +"%k") | |
if [ $HOUR -lt 6 ] || [ $HOUR -gt 18 ]; | |
then |
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 urllib | |
from threading import Thread | |
class Derruba(Thread): | |
def __init__(self, url): | |
Thread.__init__(self) | |
self.url = url | |
def run(self): |
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
#!/usr/bin/python | |
# convert a set of waypoints of a gpx file into utm ground control points txt | |
# setup: pip install gpxpy utm | |
# usage: ./gpxexport.py path/to/file.gpx | |
import sys | |
import gpxpy | |
import gpxpy.gpx | |
import utm |