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
; Sample supervisor config file. | |
[unix_http_server] | |
file=/tmp/supervisor.sock ; (the path to the socket file) | |
;chmod=0700 ; sockef file mode (default 0700) | |
;chown=nobody:nogroup ; socket file uid:gid owner | |
;username=user ; (default is no username (open server)) | |
;password=123 ; (default is no password (open server)) | |
;[inet_http_server] ; inet (TCP) server disabled by default |
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
<response> | |
<lst name="responseHeader"> | |
<int name="status">0</int> | |
<int name="QTime">10</int> | |
</lst> | |
<arr name="filelist"> | |
<lst> | |
<str name="name">segments_d</str> | |
<long name="size">110</long> | |
</lst> |
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
111.xxx.xxx.xxx RACK1 Up Normal 658.17 MB 34.04% -9216737431043722247 | |
222.xxx.xxx.xxx RACK1 Up Normal 309.34 KB 32.87% -9211045726435137916 | |
333.xxx.xxx.xxx RACK1 Up Normal 309.34 KB 32.87% -9197920792308199209 |
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
package myApp; | |
class ImplementsDynamic | |
implements Dynamic<String> { | |
public var present:Int; | |
public function new() {} | |
} |
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
# m h dom mon dow user command | |
45 5 * * * postgres pg_dumpall -l YOURDBNAME | gzip -c | ssh backup@MYBACKUPSERVER "cat | gzip /YOURDIRECTORYPATH/pg_backups/$(date +\"%Y-%m-%d:%T\")YOURFILENAME.gz" |
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
class Ability | |
include CanCan::Ability | |
def initialize(user) | |
user ||= User.new # IE: Guest user isn't signed in, create a user | |
if user.try(:is?, :admin) | |
can :manage, :all | |
elsif !user.roles.empty? && user.approved? | |
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
# include <stdio.h> | |
int main() { | |
char str[] = "Reverse me!"; | |
int length; | |
for (length = 0; str[length] != '\0'; length++) { |
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
-- | |
-- Person's unoptimized query | |
-- | |
QUERY PLAN | |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
Seq Scan on keyword_tracked_tweets (cost=0.06..484854.06 rows=50015 width=172) (actual time=16639.692..32543.957 rows=1 loops=1) | |
Filter: ((id)::double precision = trunc((random() * ($1)::double precision))) | |
InitPlan 2 (returns $1) | |
-> Result (cost=0.05..0.06 rows=1 width=0) (actual time=0.045..0.047 rows=1 loops=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
+[ Increment ptr(0) and enter loop | |
>++++++++++ Increment byte at ptr(1) 10 times | |
[ While ptr | |
>+++++++ incremement ptr(2) 7 times | |
>++++++++++ increment ptr(3) 10 times | |
>+ increment ptr(4) 1 time | |
>+++ increment ptr(5) 3 times | |
<<<< - back down to ptr 1 and decrement ptr 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
import urllib | |
import urllib.request | |
def DownloadClass(): | |
url = "http://cmes.uccs.edu/Fall2011/Math215/Videos/" | |
ext = ".mov" | |
movie_name = "Math215Lecture" | |
for i in range(1, 27): |
OlderNewer