find . -type f -name [0-9]* . # only files starting w/ digits
find . -type f -name [0-9]*.mp3 # only files starting w/ digits, ending in ".mp3"
find . -type f -name "[0-9]x[0-9] - *.mp3" # ex. "1x01 - Original Pilot.mp3"
find . -type f -name "[0-9][0-9] *.mp3" # ex. "01 Brave.mp3"
find . -type f -name "[0-9][0-9]-[0-9][0-9]*.mp3" # ex. "01-05Everywhere.mp3"
...
find . -type f -name "[0-9]x[0-9] - *.mp3" -o -name "[0-9][0-9] *.mp3" -0 -name "[0-9][0-9]-[0-9][0-9]*.mp3" # catch'm all
find . -type f -name "[0-9]x[0-9] - *.mp3" -exec rename 's/\/\d+x\d+ - ([^\/]*)$/\/$1/' {} \; # /x/y/Original Pilot.mp3
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 re | |
def is_header_clean(header): | |
if len(header) != 2: | |
return False | |
name, val = header[0].strip(), header[1].strip() | |
if re.match( r"^[\w-]+$", name) and re.match(r"^[\w\s -~]+$", val): | |
return True | |
return False |
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
module "example1" { | |
source = "./list" | |
} | |
module "example2" { | |
source = "./list" | |
values = ["this", "that", "other"] | |
} | |
module "example3" { | |
source = "./list" | |
values = ["${module.example2.many}"] |
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
[ | |
{ "id":"druid:vn914kc9255", | |
"workflowDefinition": {"dsLabel":"Workflow Definition","dsVersionID":"workflowDefinition.6","dsCreateDate":"2018-05-18T16:59:02Z","dsState":"A","dsMIME":"text/xml","dsFormatURI":null,"dsControlGroup":"X","dsSize":1647,"dsVersionable":true,"dsInfoType":null,"dsLocation":"druid:vn914kc9255+workflowDefinition+workflowDefinition.6","dsLocationType":null,"dsChecksumType":"DISABLED","dsChecksum":"none"}},"objLabel":"etdSubmitWF","objOwnerId":"fedoraAdmin","objModels":["info:fedora/fedora-system:FedoraObject-3.0","info:fedora/afmodel:Dor_WorkflowObject"],"objCreateDate":"2012-04-30T17:40:28Z","objLastModDate":"2018-05-18T16:59:02Z","objDissIndexViewURL":"https://localhost:443/fedora/objects/druid%3Avn914kc9255/methods/fedora-system%3A3/viewMethodIndex","objItemIndexViewURL":"https://localhost:443/fedora/objects/druid%3Avn914kc9255/methods/fedora-system%3A3/viewItemIndex","objState":"A"}"]}, | |
{ "id":"druid:fj761tg0163", | |
"workflowDefinition": {"dsLabel":"Workflow Definition","dsVersion |
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
$ traceroute rubygems.org | |
traceroute: Warning: rubygems.org has multiple addresses; using 151.101.192.70 | |
traceroute to rubygems.org (151.101.192.70), 64 hops max, 52 byte packets | |
1 10.0.0.1 (10.0.0.1) 69.025 ms 55.048 ms 24.030 ms | |
2 96.120.91.9 (96.120.91.9) 42.344 ms 16.853 ms 19.971 ms | |
3 be-10028-rur01.santaclara.ca.sfba.comcast.net (68.85.216.97) 82.559 ms 16.514 ms 57.404 ms | |
4 162.151.78.253 (162.151.78.253) 22.618 ms 33.143 ms 13.133 ms | |
5 be-3651-cr02.sunnyvale.ca.ibone.comcast.net (68.86.91.73) 19.991 ms 16.767 ms 17.342 ms | |
6 be-11025-cr01.9greatoaks.ca.ibone.comcast.net (68.86.87.158) 40.005 ms 54.673 ms 32.714 ms | |
7 hu-0-13-0-0-pe03.11greatoaks.ca.ibone.comcast.net (68.86.83.134) 39.771 ms 30.620 ms 38.479 ms |
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
Endpoint.which_need_archive_copy("bj102hs9687",2) | |
SELECT "endpoints".* FROM "endpoints" | |
INNER JOIN "endpoint_types" ON "endpoint_types"."id" = "endpoints"."endpoint_type_id" | |
INNER JOIN "endpoints_preservation_policies" ON "endpoints_preservation_policies"."endpoint_id" = "endpoints"."id" | |
INNER JOIN "preservation_policies" ON "preservation_policies"."id" = "endpoints_preservation_policies"."preservation_policy_id" | |
INNER JOIN "preserved_objects" ON "preserved_objects"."preservation_policy_id" = "preservation_policies"."id" | |
WHERE "endpoint_types"."endpoint_class" = $1 | |
AND "preserved_objects"."druid" = $2 | |
AND (NOT (EXISTS ( |
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
diff --git a/Gemfile.lock b/Gemfile.lock | |
index 1ea400c..16a045c 100644 | |
--- a/Gemfile.lock | |
+++ b/Gemfile.lock | |
@@ -1,7 +1,7 @@ | |
GEM | |
remote: https://rubygems.org/ | |
specs: | |
- active-fedora (8.4.0) | |
+ active-fedora (8.4.2) |
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
#!/bin/bash | |
# | |
# requires Github CLI extensions (`hub`) | |
# Hub w/ multifactor authentication requires 4 lines in ~/.config/hub like: | |
# --- | |
# github.com: | |
# - oauth_token: SOME_TOKEN_STRING | |
# user: atz | |
# | |
# Get the token string from a new token here: https://github.com/settings/tokens |
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
$ for x in 000206244200003 000174038800007 000188997700136 000288081900013 000183571800002 000297154900052 000224524400014; do echo $x; RAILS_ENV=production bundle exec rake sw:wos_publication[$x] ; done | |
000206244200003 | |
Unable to load RSpec. | |
<?xml version="1.0"?> | |
<ArrayOfPublicationItem xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<PublicationItem> | |
<PublicationItemID>31250899</PublicationItemID> | |
<Title>The FEATURE framework for protein function annotation: modelling new functions, improving performance, and extending to novel applications</Title> | |
<Abstract>Structural genomics efforts contribute new protein structures that often lack significant sequence and fold similarity to known proteins. Traditional sequence and structure-based methods may not be sufficient to annotate the molecular functions of these structures. Techniques that combine structural and functional modeling can be valuable for functional annotation. FEATURE is a flexible fr |
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
curl -v -H "Content-Type: text/xml;charset=UTF-8" -H 'Cookie: SID="3AXgqFUsHT3lTpcgEhQ"' -d @wtf.xml "http://search.webofknowledge.com/esti/wokmws/ws/WokSearch" | |
* Trying 167.68.24.86... | |
* TCP_NODELAY set | |
* Connected to search.webofknowledge.com (167.68.24.86) port 80 (#0) | |
> POST /esti/wokmws/ws/WokSearch HTTP/1.1 | |
> Host: search.webofknowledge.com | |
> User-Agent: curl/7.52.1 | |
> Accept: */* | |
> Content-Type: text/xml;charset=UTF-8 | |
> Cookie: SID="3AXgqFUsHT3lTpcgEhD" |
NewerOlder