cp -av "original file name.ext" "\destination\path\target file name.ext"
2018-11-23
2018-09-27
MacOS - Command line zip file creation
Several sample commands:
find ~/Documents/unzipTest -type f -name "*.zip" -exec unzip {} -d ~/Documents/unzipTest/ \;
find ~/Documents/unzipTest -type f -name "*.zip" -print0 | xargs -0 -I{} unzip {} -d ~/Documents/unzipTest
find <path_of_your_zips> -type f -name "*.zip" -exec unzip {} -d <out> \;
find <path_of_your_zips> -type f -name "*.zip" -exec unzip {} -d <out> \;
find /Users/ca/Documents/unzipTest/ -type f -name "*.zip" -exec unzip {} -d ~\Documents\unzipTest\ \;
find /Users/ca/Documents/unzipTest -type f -name "*.zip"
find ~/Documents/unzipTest -type f -name "*.zip" -exec unzip {} -d ~/Documents/unzipTest/ \;
find ~/Documents/unzipTest -type f -name "*.zip" -print0 | xargs -0 -I{} unzip {} -d ~/Documents/unzipTest
find <path_of_your_zips> -type f -name "*.zip" -exec unzip {} -d <out> \;
find <path_of_your_zips> -type f -name "*.zip" -exec unzip {} -d <out> \;
find /Users/ca/Documents/unzipTest/ -type f -name "*.zip" -exec unzip {} -d ~\Documents\unzipTest\ \;
find /Users/ca/Documents/unzipTest -type f -name "*.zip"
2018-09-11
JavaScript - Isotope, how to know if the object was successfully made an isotope
var iso = $('.grid').data('isotope');
if(iso) console.log("Object .grid has been isotope'd!");
if(iso) console.log("Object .grid has been isotope'd!");
JavaScript - Isotope object properties inspection, export JSON configuration to the console
var iso = $('.grid').data('isotope');
console.log( JSON.stringify( iso.options ) );
console.log( JSON.stringify( iso.options ) );
2018-09-05
Meteor - How to make an HTTP call to Wikipedia's REST API
HTTP.call( 'GET', 'https://en.wikipedia.org/api/rest_v1/page/summary/Jane_Austen', {
params: {
"User-Agent": "your@email.com"
, "Accept": "application/json"
, "charset": "utf-8"
, "profile" : "https://www.mediawiki.org/wiki/Specs/Summary/1.3.7"
}
}, function( error, response ) {
if ( error ) {
console.log( error );
} else {
console.log( response.data );
}
});
params: {
"User-Agent": "your@email.com"
, "Accept": "application/json"
, "charset": "utf-8"
, "profile" : "https://www.mediawiki.org/wiki/Specs/Summary/1.3.7"
}
}, function( error, response ) {
if ( error ) {
console.log( error );
} else {
console.log( response.data );
}
});
2018-08-30
MySQL - How to use a case sensitive regular expression in a where clause
select *
from table_name
where field_name REGEXP '[A-Z]{3,}'
COLLATE utf8_bin
;
from table_name
where field_name REGEXP '[A-Z]{3,}'
COLLATE utf8_bin
;
2018-08-26
Python/MySQL - How to overcome MySQL GROUP_CONCAT character limit
cursor.execute(
'SET SESSION group_concat_max_len = 1000000; \
SELECT a, b, c \
FROM table_name \
WHERE field_name = %s \
;'
, [
variable_for_where_clause
]
, multi=True
)
'SET SESSION group_concat_max_len = 1000000; \
SELECT a, b, c \
FROM table_name \
WHERE field_name = %s \
;'
, [
variable_for_where_clause
]
, multi=True
)
Subscribe to:
Comments (Atom)