| layout | title |
|---|---|
post |
Blogging Like a Boss |
yaml tables. must be first thing in the gist
| #!/usr/bin/env python | |
| """ | |
| Twitter's API doesn't allow you to get replies to a particular tweet. Strange | |
| but true. But you can use Twitter's Search API to search for tweets that are | |
| directed at a particular user, and then search through the results to see if | |
| any are replies to a given tweet. You probably are also interested in the | |
| replies to any replies as well, so the process is recursive. The big caveat | |
| here is that the search API only returns results for the last 7 days. So |
| function uploadFile(file) { | |
| var formData = new FormData(); | |
| formData.append("userfile", file); | |
| var request = new XMLHttpRequest(); | |
| request.onload = function () { | |
| if (request.status == 200) { | |
| document.location.href='/'; | |
| } else { | |
| alert('Error! Upload failed'); | |
| } |
| postgres: | |
| image: postgres:9.4 | |
| volumes: | |
| - ./init.sql:/docker-entrypoint-initdb.d/init.sql |
| <?php | |
| /** | |
| * Write an array to a JSON file. Replace $data with your array, | |
| * and skip JSON encoding if you already have JSON | |
| */ | |
| function write_data_to_file( $filename ) { | |
| $json = file_get_contents( 'http://path.to/external-site/file.json'); | |
| $time = time(); | |
| file_put_contents( $filename, $json ); | |
| } |
Paul Buonopane [email protected] at NamePros
PGP: https://keybase.io/zenexer
I'm working on cleaning up this advisory so that it's more informative at a glance. Suggestions are welcome.
This advisory addresses the underlying PHP vulnerabilities behind Dawid Golunski's [CVE-2016-10033][CVE-2016-10033], [CVE-2016-10045][CVE-2016-10045], and [CVE-2016-10074][CVE-2016-10074]. It assumes prior understanding of these vulnerabilities.
This advisory does not yet have associated CVE identifiers.
| #!/bin/bash | |
| mkdir -p JPG | |
| find . -name "*.NEF" -print0 | xargs -0 -P 4 -I file sips -s format jpeg file --out JPG/file.jpg |
| #!/usr/bin/env bash | |
| # https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
| # https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
| # https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
| # https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
| # https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
| # https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
| # Versions | |
| CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE` |
| <?php | |
| if (isset($_GET['seek'])) { | |
| $seek = $_GET['seek']; | |
| $lines = []; | |
| $handle = fopen('error_log', 'rb'); | |
| if ($seek > 0) { | |
| fseek($handle, $seek); | |
| } |
| package student.napt.com.napt2.Activity; | |
| import android.Manifest; | |
| import android.content.DialogInterface; | |
| import android.content.Intent; | |
| import android.content.pm.PackageManager; | |
| import android.net.Uri; | |
| import android.os.Build; | |
| import android.os.Bundle; | |
| import android.os.Handler; |