This file contains hidden or 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 playerId = 'myEmbedTarget'; | |
| kWidget.embed({ | |
| 'targetId': playerId, | |
| 'wid': '_xxx', | |
| 'uiconf_id': 'xxxx', | |
| 'flashvars': { | |
| 'playlistAPI': { | |
| 'plugin': true, | |
| 'includeInLayout': false, | |
| 'autoPlay': true, |
This file contains hidden or 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 | |
| $curl = curl_init('http://testing-ground.scraping.pro/blocks'); | |
| curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE); | |
| $page = curl_exec($curl); | |
| if(curl_errno($curl)) // check for execution errors | |
| { | |
| echo 'Scraper error: ' . curl_error($curl); | |
| exit; | |
| } | |
| curl_close($curl); |
This file contains hidden or 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 | |
| $contents = file_get_contents("URL HERE"); | |
| $dom = new DOMDocument(); | |
| @$dom->loadHTML($contents); | |
| $xpath = new DOMXpath($dom); | |
| $element = trim((string) $xpath->query("XPATH FROM CHROME HERE")->item(0)->nodeValue); | |
| echo $element; | |
| ?> |
This file contains hidden or 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
| ### java -jar | |
| address = ip:port | |
| address = *:port (* wildcard allow any ip address) | |
| java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=*:5005,suspend=y -jar target/cxf-boot-simple-0.0.1-SNAPSHOT.jar | |
| ### Maven | |
| Debug Spring Boot app with Maven: |
This file contains hidden or 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 Node.js core modules. | |
| fs = require 'fs' | |
| url = require 'url' | |
| http = require 'http' | |
| querystring = require 'querystring' | |
| #### The Pixel Ping server | |
| # Keep the version number in sync with `package.json`. | |
| VERSION = '0.1.3' |
This file contains hidden or 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 boto3 | |
| ec2 = boto3.resource('ec2') | |
| volume_iterator = ec2.volumes.all() | |
| for v in volume_iterator: | |
| for a in v.attachments: | |
| print "{0} {1} {2}".format(v.id, v.state, a['InstanceId']) |
This file contains hidden or 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
| {"lastUpload":"2020-04-27T14:09:27.441Z","extensionVersion":"v3.4.3"} |
This file contains hidden or 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
| alias gh="open \`git remote -v | grep git@github.com | grep fetch | head -1 | cut -f2 | cut -d' ' -f1 | sed -e's/:/\//' -e 's/git@/http:\/\//'\`" |
This file contains hidden or 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
| function FindProxyForURL(url, host) { | |
| PROXY = "PROXY proxy.corp.ipsy.com:80; DIRECT"; | |
| hosts = ["*.acloud.guru", "ifconfig.me"]; | |
| for (let i = 0; i < hosts.length; i++) { | |
| if (shExpMatch(host, hosts[i])) { | |
| return PROXY; | |
| } | |
| } | |
| return "DIRECT"; | |
| } |
This file contains hidden or 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
| Add the following in .zshrc: | |
| ... | |
| plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl) | |
| ... | |
| ### Fix slowness of pastes with zsh-syntax-highlighting.zsh | |
| pasteinit() { | |
| OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]} | |
| zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`? |
OlderNewer