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
cd /Applications/VLC.app/Contents/MacOS | |
./VLC --http-host localhost --http-port 4242 --http-password <password> | |
# then open localhost:4242 on your browser. leave username blank and enter <password> as the password |
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 | |
if __name__ == '__main__': | |
import os | |
files = [f for f in os.listdir('.') if os.path.isfile(f)] | |
for f in files: | |
if ".log" in f: | |
print "renaming %s" % (f) | |
os.rename(f, f+".txt") |
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
-- Replace MYDB with the name of your db below | |
-- close existing connections | |
ALTER DATABASE MYDB | |
SET SINGLE_USER | |
WITH ROLLBACK IMMEDIATE | |
GO | |
-- switch to some other db | |
USE master |
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
select email, hex(email) from users where email like "%bademail%"; |
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
select * from users where email regexp ".*[[:cntrl:]]+.*"; |
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
$ cat example.proto | |
message AMessage | |
{ | |
required int32 a=1; | |
optional int32 b=2; | |
} | |
$ protoc example.proto --descriptor_set_out=example.pb | |
$ mono ProtoGen.exe example.pb | |
$ more Example.cs |