Skip to content

Instantly share code, notes, and snippets.

@nhanco
nhanco / google-img-resize.mdown
Created August 21, 2019 05:19
Google’s authentication-less on-the-fly image resizing service

Google's authentication-less on-the-fly image resizing service

I found it while poking around the Google+ HTML. Jotting down some notes felt like a good idea, so here goes. If you know more about this API, let me know, please!

(Word of warning: I spent ~30 minutes on both my experimentation and this here write-up, so it might not be the most thought-provoking, brilliant thing you read today.)

@nhanco
nhanco / add-jquery-bookmarklet.js
Last active April 16, 2019 12:16 — forked from rotten77/add-jquery-bookmarklet.js
Add jQuery to site (bookmarklet)
javascript:(function(){var script = document.createElement('script');script.src = '//ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js';document.getElementsByTagName('head')[0].appendChild(script);})();
javascript:(function(){var script = document.createElement('script');script.src = '//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js';document.getElementsByTagName('head')[0].appendChild(script);})();
<?php
$url = "http://www.phimmoi.net/phim/huyen-thoai-cua-ngay-mai-phan-4-7585/xem-phim.html";
$ch = curl_init();
{
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@nhanco
nhanco / nginx-dev-ssl.sh
Created July 7, 2018 16:02 — forked from LeZuse/nginx-dev-ssl.sh
nginx development SSL setup on localhost
# copy default OpenSSL config
cp /usr/local/etc/openssl/openssl.cnf .
# make changes according to https://fbcs.co.uk/self-signed-multiple-domain-ssl-certificates/
vim openssl.cnf
# [alt_names]
# DNS.1 = localhost
# IP.1 = 0.0.0.0
# IP.2 = 127.0.0.1