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
# See https://github.com/facebookresearch/fastText/blob/master/pretrained-vectors.md | |
for (( i=1; i<=$#; i++ )); do | |
wget -c "https://s3-us-west-1.amazonaws.com/fasttext-vectors/wiki.${!i}.zip" | |
done | |
# For example: | |
# ./download.sh bg el ka hy ru fa es fr de it pt ar tr pl ko | |
# If stopped it will not re-start automatically, but if re-started it will continue from where it stopped. |
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
var gulp = require('gulp'), | |
gulpWatch = require('gulp-watch'), | |
del = require('del'), | |
runSequence = require('run-sequence'), | |
argv = process.argv; | |
/** | |
* Ionic hooks | |
* Add ':before' or ':after' to any Ionic project command name to run the specified |
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
var gulp = require('gulp'), | |
gulpWatch = require('gulp-watch'), | |
del = require('del'), | |
runSequence = require('run-sequence'), | |
argv = process.argv; | |
gulp.task('serve:before', ['watch']); | |
gulp.task('emulate:before', ['build']); | |
gulp.task('deploy:before', ['build']); | |
gulp.task('build:before', ['build']); |
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
<?php | |
header("Access-Control-Allow-Origin: *"); | |
header("Content-Type: text/html; charset=utf-8"); | |
$data = array( | |
'from' => '[email protected]', | |
'to' => '[email protected]', | |
'subject' => '', | |
'text' => "" | |
); |
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
Problem: Need to search files in subdirectory for metadata | |
Solution: | |
1) Find files and matches and output to data file | |
a) Use find to get loop of files.. | |
b) identify -verbose to get metadata of files.. | |
c) grep to get lines around match.. | |
d) cat to output it to results file | |
2) Make sense of response data |
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
Step 1 - Sharing/Share Folder | |
https://api.dropboxapi.com/2/sharing/share_folder | |
{ | |
"path": {your path}, | |
"force_async": false, | |
"acl_update_policy": "editors" | |
} | |
it returns the shared folder id in the root as shared_folder_id |
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
$('html').click(function(){ | |
// Hide Menus if visible | |
$('#yourMenuName').hide(); | |
}); | |
$('html').on('submit', '#form2', function(e){ | |
e.preventDefault(); | |
$('#yourOverlayName').show(); | |
}); |
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
//of your theme... | |
function test_ajax() | |
{ | |
$pass = "empty"; | |
if( isset( $_POST['passthrough'] ) ){ $pass = $_POST['passthrough']; } | |
die( json_encode( array("result"=>"true", "vars" => $pass) ) ); | |
} | |
add_action( 'wp_ajax_nopriv_test_ajax', 'test_ajax' ); // if user is not logged in |
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
var BrowserDetect = { | |
init: function () { | |
this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; | |
this.version = this.searchVersion(navigator.userAgent) | |
|| this.searchVersion(navigator.appVersion) | |
|| "an unknown version"; | |
this.OS = this.searchString(this.dataOS) || "an unknown OS"; | |
}, | |
searchString: function (data) { | |
for (var i=0;i<data.length;i++) { |
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 HTML5 / modern browsers--> | |
<input name="name" placeholder="Enter Name" value="" /> | |
<!--for newer browsers--> | |
<input name="name" value="Enter Name" onfocus="if(this.value=='Enter Name')this.value='';" onblur="if(this.value=='')this.value='Enter Name';" /> |
NewerOlder