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
public function Parse ($url) { | |
$fileContents= file_get_contents($url); | |
$fileContents = str_replace(array("\n", "\r", "\t"), '', $fileContents); | |
$fileContents = trim(str_replace('"', "'", $fileContents)); | |
$simpleXml = simplexml_load_string($fileContents); | |
$json = json_encode($simpleXml); | |
return $json; | |
} |
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
----------------------------------------------------------------------------------------------------------------------------- | |
| | | |
| LIST OF SEARCH APIs ON THE INTERNET COMPILED FOR THE EASE | | |
| | | |
|-----------------------------------------------------------------------------------------------------------------------------| | |
YouTube query: | |
http://gdata.youtube.com/feeds/api/videos?q=SEARCH TERM&v=2&alt=jsonc&max-results=10 | |
Wikipedia query: |
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
handleDrop = files => { | |
// Push all the axios request promise into a single array | |
const uploaders = files.map(file => { | |
// Initial FormData | |
const formData = new FormData(); | |
formData.append("file", file); | |
formData.append("tags", `codeinfuse, medium, gist`); | |
formData.append("upload_preset", "pvhilzh7"); // Replace the preset name with your own | |
formData.append("api_key", "1234567"); // Replace API key with your own Cloudinary key | |
formData.append("timestamp", (Date.now() / 1000) | 0); |
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
require 'openssl' | |
require 'uri' | |
require 'net/http' | |
def urlbox(url, options={}, format='png') | |
urlbox_apikey = '' | |
urlbox_secret = '' | |
query = { | |
:url => url, # required - the url you want to screenshot |
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
{ | |
"extends": [ | |
"airbnb", | |
"prettier", | |
"prettier/react" | |
], | |
"parser": "babel-eslint", | |
"parserOptions": { | |
"ecmaVersion": 8, | |
"ecmaFeatures": { |
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
test.hostmatic.site { | |
gzip | |
root /var/www/ | |
log /var/www/access.log | |
errors /var/www/errors.log | |
} |
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
const initialState = { | |
mute: true, | |
inProgress: true, | |
.../// | |
} | |
const initialState = { | |
controls: { | |
mute: true, |
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
org.gradle.parallel=true | |
org.gradle.daemon=true | |
org.gradle.jvmargs=-Xms512m -Xmx1024m |
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
$ preact watch | |
> Development server started at http://localhost:8080 | |
/usr/local/lib/~/preact-cli/lib/lib/entry.js | |
Module not found: Error: Can't resolve 'preact/devtools' in '/usr/local/lib/node_modules/preact-cli/lib/lib' | |
resolve 'preact/devtools' in '/usr/local/lib/node_modules/preact-cli/lib/lib' | |
Parsed request is a module | |
using description file: /usr/local/lib/node_modules/preact-cli/package.json (relative path: ./lib/lib) | |
Field 'browser' doesn't contain a valid alias configuration | |
after using description file: /usr/local/lib/node_modules/preact-cli/package.json (relative path: ./lib/lib) | |
resolve as module |
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
setInterval(function () { | |
window.scrollTo(0,document.body.scrollHeight); | |
$('.not-following button.user-actions-follow-button').click(); | |
}, 1000) |
NewerOlder