I no longer mantain this list. There are lots of other very comprehensive JavaScript link lists out there. Please see those, instead (Google "awesome JavaScript" for a start).
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
#!/usr/bin/env php | |
<?php | |
//usage: php envato-screenshots-downloader.php /path/to/save/screenshots http://url/to/screenshots/page | |
set_time_limit(0); | |
$dir = $argv[1]; | |
$source = $argv[2]; | |
print_r($argv); | |
mkdir ($dir); | |
$src = file_get_contents($source); | |
$pattern = '/src="(https:\/\/0.s3[a-zA-Z0-9_\-\.\/%]+)"/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
// ========================================================= | |
// Gulp Task: browsersync | |
// NOTE: Using gulp v4 | |
// Description: Sync sass, typescript, html, and browser | |
// using external config or add modify src | |
// npm install --save-dev browser-sync gulp-typescript gulpjs/gulp.git#4.0 gulp-load-plugins | |
// Options: node-sass gulp-sass || gulp-ruby-sass | |
// ========================================================= | |
var config = require('../config.js'); | |
var browserSync = require('browser-sync').create(); |
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
1. Go to Sublime Text to: Tools -> Build System -> New Build System | |
and put the next lines: | |
{ | |
"cmd": ["python3", "-i", "-u", "$file"], | |
"file_regex": "^[ ]File \"(...?)\", line ([0-9]*)", | |
"selector": "source.python" | |
} | |
Then save it with a meaningful name like: python3.sublime-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
var pageURL = window.location.href; | |
var lastURLSegment = pageURL.substr(pageURL.lastIndexOf('/') + 1); | |
console.log(lastURLSegment); |
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
Name | MIMEType | Extension | Description | |
---|---|---|---|---|
aac | audio/aac | .aac | AAC audio file | |
abw | application/x-abiword | .abw | AbiWord document | |
arc | application/octet-stream | .arc | Archive document (multiple files embedded) | |
avi | video/x-msvideo | .avi | AVI: Audio Video Interleave | |
azw | application/vnd.amazon.ebook | .azw | Amazon Kindle eBook format | |
bin | application/octet-stream | .bin | Any kind of binary data | |
bz | application/x-bzip | .bz | BZip archive | |
bz2 | application/x-bzip2 | .bz2 | BZip2 archive | |
csh | application/x-csh | .csh | C-Shell script |
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
/* | |
* Handling Errors using async/await | |
* Has to be used inside an async function | |
*/ | |
try { | |
const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
// Success 🎉 | |
console.log(response); | |
} catch (error) { | |
// Error 😨 |
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
This is how I managed to build py-faster-rcnn on my fresh installed 64bit Ubuntu 16.04.For those who dont know, py-faster-rcnn | |
if a caffe based python implementation of faster-rcnn for image localization. This is more of a note for me. | |
WARNING: My methods may not work for everyone and may be for the later versions. | |
This is a GPU supported build. Make sure you have an nvidia gpu(as recent as possible,I have a GTX 1050 Ti, and yes I know | |
it's by no means a very good gpu for the task.But it handles things nicely.). | |
Now I am also running Tensorflow-gpu installed via pip. That requires cuda toolkit 8.0 and cudnn 5.1 | |
So,if we are to start from scratch, | |
1.Download cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb from nvidia website. |
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 React from "react" | |
import { Route, Switch } from "react-router-dom" | |
const AppRoute = ({ component: Component, layout: Layout, ...rest }) => ( | |
<Route {...rest} render={props => ( | |
<Layout> | |
<Component {...props} /> | |
</Layout> | |
)} /> | |
) |