Skip to content

Instantly share code, notes, and snippets.

@antonavy
antonavy / ipv6-httpd.py
Last active October 31, 2016 13:02 — forked from akorobov/ipv6-httpd.py
quick ipv6 http server using python's SimpleHttpServer
import socket
from http.server import HTTPServer
from http.server import SimpleHTTPRequestHandler
class MyHandler(SimpleHTTPRequestHandler):
def do_GET(self):
if self.path == '/ip':
self.send_response(200)
self.send_header('Content-type', 'text/html')
self.end_headers()
@antonavy
antonavy / copy-into-browser.js
Created July 8, 2016 09:46 — forked from techieshark/copy-into-browser.js
jquery-and-lodash-in-console
// For quickly trying things out in the browser, jQuery and Lo-Dash (like Underscore.js) are great.
// Read the code below (never copy & paste code you don't trust),
// then you can copy & paste it into the browser console to load jQuery & lodash.
(function () {
var jq = document.createElement('script');
jq.src = 'https://code.jquery.com/jquery-2.1.4.js';
@antonavy
antonavy / trim_pfsense2.2.4.md
Created May 28, 2016 18:22 — forked from mdouchement/trim_pfsense2.2.4.md
Enable TRIM on pfsense 2.2.4

Installation

Use memstick-licecd to install pfsense on your SSD.

Enable TRIM

  • Initialize fstab:
[2.2.4-RELEASE][root@pfSense.localdomain]/root: /usr/local/sbin/ufslabels.sh

It may do nothing because all is already initialize but it's only in a case of