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
IFS=$'\n' | |
myUser=`whoami` | |
echo Local user is $myUser | |
SYNO_USER=`psql synofoto -t -c "select id from user_info where name='$myUser'"` | |
echo SYNO_USER is $SYNO_USER | |
echo Scanning for video files.. | |
for i in `find . -iname \*.mov -type f | grep -v eaDir | grep -v "_3"`; do | |
#echo i is $i | |
fname=$(dirname ${i})/@eaDir/$(basename ${i})/SYNOPHOTO_FILM_H.mp4; |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string path = AppDomain.CurrentDomain.BaseDirectory + "pic.txt"; | |
using (StreamReader sr = new StreamReader(path)) | |
{ | |
WebClient mywebclient = new WebClient(); | |
string line; | |
while (!string.IsNullOrEmpty(line = sr.ReadLine())) |
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
## {{{ http://code.activestate.com/recipes/491264/ (r4) | |
import socket | |
class DNSQuery: | |
def __init__(self, data): | |
self.data=data | |
self.dominio='' | |
tipo = (ord(data[2]) >> 3) & 15 # Opcode bits | |
if tipo == 0: # Standard query |
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
# -*- coding: utf-8 -*- | |
import re | |
import socket | |
class UnsupportedQuery(BaseException): | |
pass |