Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| db = db.getSiblingDB("e1_learn-qa"); | |
| //db.getCollection("profiles").find({}); | |
| var oldest = 24 * 60 * 60 * 1000 * 365 * 18; | |
| var newest = 24 * 60 * 60 * 1000 * 365 * 5; | |
| var randomDate = function () { | |
| return new Date(Date.now() - (Math.random() * (oldest - newest))) | |
| } | |
| db.profiles.update( | |
| {dob: {$exists: false}}, |
| #!/bin/bash | |
| logger "Installing Educator Base" | |
| yum -y update | |
| yum -y group install "Development Tools" | |
| cd /home/edm/ | |
| wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
| rpm -i epel-release-latest-7.noarch.rpm | |
| yum -y update | |
| yum -y install nmap httpd wget rkhunter net-tools htop mod_ssl rsync screen perl-App-cpanminus perl-CPAN perl-XML-DOM perl-XML-Parser perl-XML-SAX perl-Template-Toolkit memcached imlib2 imlib2-devel mod_perl perl-String-CRC32 perl-Cache-Memcached perl-XML-LibXML libdbi-dbd-mysql perl-DBI perl-DBD-MySQL perl-DBD-SQLite perl-CGI perl-JSON perl-JSON-PP perl-JSON-XS perl-File-Slurp perl-Redis perl-DateTime perl-DateTime-Format-MySQL perl-DateTime-Format-Strptime perl-DateTime-TimeZone perl-Digest-SHA perl-Digest-SHA perl-Digest-SHA1 perl-Email-Simple perl-Encode perl-Excel-Writer-XLSX perl-File-Temp perl-HTML-Parser perl-HTML-Strip perl-HTTP-BrowserDetect perl-HTTP-Cookies perl-Crypt-CBC perl-Crypt-Rijndael perl-Net-OAuth perl-Net-XMPP perl-Parallel-ForkManager perl-SOAP |
| { | |
| "Version":"2012-10-17", | |
| "Statement":[{ | |
| "Sid":"AddPerm", | |
| "Effect":"Allow", | |
| "Principal": "*", | |
| "Action":["s3:GetObject"], | |
| "Resource":["arn:aws:s3:::weatherstem/*" | |
| ] | |
| } |
| #!/usr/bin/perl | |
| use warnings; | |
| use strict; | |
| use Amazon::S3; | |
| use vars qw/$OWNER_ID $OWNER_DISPLAYNAME/; | |
| my $aws_access_key_id = 'YOUR AWS ACCESS KEY HERE'; | |
| my $aws_secret_access_key = 'YOUR AWS SECRET ACCESS KEY HERE'; |
| eventRender: function(event, element) { | |
| if ( event.user ) { | |
| element.find(".fc-title").append(" (" + event.user + ")"); | |
| } | |
| //console.dir(element); | |
| } |
| calendar = $('#calendar').fullCalendar({ | |
| defaultView: "agendaWeek", | |
| header: { | |
| left: 'prev,next today', | |
| center: 'title', | |
| right: 'month,agendaWeek,agendaDay' | |
| }, | |
| buttonText: { | |
| today: "Today", | |
| month: "Month", |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| function countFlaggedQs(){ | |
| var fgC = $(".q-flag").children(".icon-flag").length, | |
| fgT = ' flagged questions'; | |
| fgT = (fgC === 1) ? ' flagged question' : ' flagged questions'; | |
| $("#q_fg").html( fgC+' <i class="icon-flag" title="'+fgC+fgT+'"></i>' ); | |
| } |
| function countFlaggedQs(){ | |
| var fgC = 0, | |
| fgT = ' flagged questions'; | |
| $(".q-flag").each(function(){ | |
| if( $(this).children(".icon-flag").length ) { | |
| fgC++; | |
| } | |
| }); | |
| fgT = (fgC === 1) ? ' flagged question' : ' flagged questions'; | |
| $("#q_fg").html( fgC+' <i class="icon-flag" title="'+fgC+fgT+'"></i>' ); |
| <script charset="utf8" src="/libs/js/jquery.hotkeys.min.js"></script> | |
| //When the ALT + N keys are pressed together, trigger the button click (as it has additional logic to process). | |
| $(document).on("keydown", null, "alt+n", function(){ | |
| $("#BUTTON_ID").trigger("click"); | |
| }); |