Skip to content

Instantly share code, notes, and snippets.

@cwage
cwage / -
Created November 14, 2016 02:05
return 0 unless ($ref->{'user'}->{'screen_name'} =~ /$userfilter/i);
return 0 if ($ref->{'text'} =~ /(rand|ron) paul|Hillary|Clinton|Cruz|Rubio|POTUS|bernie|sanders|trump/i);
@cwage
cwage / coronavirus.md
Last active February 26, 2024 07:32
Coronavirus: an email to my family (JULIANA GRANT, MD MPH)

From https://www.julianagrant.com/blog/2020/2/29/coronavirus:

Notes: I originally wrote this to share with my family and close friends. It’s now getting passed around so I’m posting it publicly. I have revised the language slightly a few times. This is the most current version.

Hi folks,

A number of you have asked me what I think is going to happen with coronavirus (COVID-19) and what we should be doing to prepare. I have a few thoughts about what’s likely to happen and what you can do about it. For those of you who don’t know me well, I am a preventive medicine physician and infectious disease epidemiologist. I graduated from the CDC’s Epidemic Intelligence Service and have over 17 years of experience in the field, most of that with CDC.

Wishing everyone good health,

smtpd_recipient_restrictions =
permit_sasl_authenticated,
#check_client_access hash:/etc/postfix/lists/whitelist,
# same use as above for whitelisting, but CIDR for convenience:
#check_client_access cidr:/etc/postfix/lists/cidrwhitelist,
#check_recipient_access hash:/etc/postfix/recipients,
reject_invalid_hostname,
reject_non_fqdn_hostname,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
@cwage
cwage / -
Created December 30, 2013 06:29
var D=window.D||{};D.useConfig=function(a){D.config={cn:{TOOLBAR_SERVER:"http://toolbar3.diigo.cn",UPLOAD_SERVER:"http://www.diigo.cn",DOMAIN:"diigo.cn"},www:{TOOLBAR_SERVER:"https://toolbar3.diigo.com",UPLOAD_SERVER:"https://www.diigo.com",DOMAIN:"diigo.com"},preview:{TOOLBAR_SERVER:"https://preview.diigo.com",UPLOAD_SERVER:"https://preview.diigo.com",DOMAIN:"diigo.com"}}[{dev:"cn",dev1:"preview",dev2:"www"}[a]||a];if(/dev/.test(a))D.config.dontUseGA=true};var GlobalData;
function resetGlobalData(){GlobalData={signedIn:false,user:"",userId:null,realName:"",userLevel:0,myTags:[],myTagsWithCount:[],myBmLists:[],myGroups:[],myContacts:[],permissions:{capture:true,image:true,premium:true,snapshot:true,highlight:true}}}
var SignInManager=D.SignInManager={checkSignInCookie:function(a){var b=this;chrome.cookies.get({url:"http://"+D.config.DOMAIN,name:"diigoandlogincookie"},function(c){if(c)var d=c.value.split("-.-")[1];b.onUsernameSeen(d);a&&a()})},onUsernameSeen:function(a){if(a)if(this.isSignedIn()){if(a!=GlobalD
CREATE FUNCTION rot13(stringIn VARCHAR(500)) RETURNS VARCHAR(500)
BEGIN
DECLARE v1 INT DEFAULT 1;
DECLARE stringOut VARCHAR(200) DEFAULT '';
DECLARE str VARCHAR(1) DEFAULT '';
WHILE v1 <= LENGTH(stringIn) DO
SET str = SUBSTR(stringIn,v1,1);
CASE BINARY str
WHEN 'A' THEN SET stringOut = CONCAT(stringOut , 'N');
$filters = $this->getUser()->getAttribute('organization.filters',
null, 'admin_module');
$configuration = new organizationGeneratorConfiguration();
$filtersObj = $configuration->getFilterForm($filters);
$tableMethod = $configuration->getTableMethod();
$filtersObj->setTableMethod($tableMethod);
$query = $filtersObj->buildQuery($filters);
[2018-09-15 22:09:00] ************************************************************
[2018-09-15 22:09:00] * Begin calibration of flat frames
[2018-09-15 22:09:00] ************************************************************
[2018-09-15 22:09:00]
[2018-09-15 22:09:00] * Searching for a master dark frame with exposure time = 0.1s -- best match is 20s
[2018-09-15 22:09:00] * Master bias: /home/cwage/bestpics/pleiades/output/master/bias-BINNING_1.xisf
[2018-09-15 22:09:00] * Master dark: /home/cwage/bestpics/pleiades/output/master/dark-BINNING_1-EXPTIME_20.xisf
[2018-09-15 22:09:00]
[2018-09-15 22:09:00] ImageCalibration: Global context
[2018-09-15 22:09:00]
cwage@portaplotz:~/Downloads/M81$ ls
Calibrated-Color-T3-dougggg-M81-20160117-035255-Color-BIN1-W-120-001.fit Calibrated-Color-T3-dougggg-M81-20160117-041312-Color-BIN1-W-120-006.fit Calibrated-Color-T3-dougggg-M81-20160131-000826-Color-BIN1-E-120-002.fit
Calibrated-Color-T3-dougggg-M81-20160117-035741-Color-BIN1-W-120-002.fit Calibrated-Color-T3-dougggg-M81-20160118-024806-Color-BIN1-W-120-001.fit Calibrated-Color-T3-dougggg-M81-20160131-001129-Color-BIN1-E-120-003.fit
Calibrated-Color-T3-dougggg-M81-20160117-040046-Color-BIN1-W-120-003.fit Calibrated-Color-T3-dougggg-M81-20160118-025409-Color-BIN1-W-120-002.fit Calibrated-Color-T3-dougggg-M81-20160131-001417-Color-BIN1-E-120-004.fit
Calibrated-Color-T3-dougggg-M81-20160117-040521-Color-BIN1-W-120-004.fit Calibrated-Color-T3-dougggg-M81-20160118-025900-Color-BIN1-W-120-003.fit Calibrated-Color-T3-dougggg-M81-20160131-001707-Color-BIN1-E-120-005.fit
Calibrated-Color-T3-dougggg-M81-20160117-041006-Color-BIN1-W-120-005.fit Calibrated-Color-T3-dougggg-M