Skip to content

Instantly share code, notes, and snippets.

STYLE_WEIGHT=5e2
STYLE_SCALE=1.0
th neural_style.lua \
-content_image examples/inputs/hoovertowernight.jpg \
-style_image starry_night_gigapixel.jpg \
-style_scale $STYLE_SCALE \
-print_iter 1 \
-style_weight $STYLE_WEIGHT \
-image_size 256 \
@andersondias
andersondias / ordering.sql
Last active January 6, 2016 05:56
Ordering by nulls on Postgres
-- Default order will return NULL values at
-- the end of list
SELECT value FROM example ORDER BY value;
------------
-- value --
------------
-- 1 --
-- 2 --
-- 3 --
-- NULL --
@cecilemuller
cecilemuller / readme.md
Last active January 29, 2016 15:09
Let's encrypt (Nginx, Ubuntu 14.04 LTS)

Install the client:

apt-get install git
git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt

Generate certificates using manual mode:

@matthieu-lapeyre
matthieu-lapeyre / .gitattributes
Last active January 8, 2016 20:53
Odroid XU4 Solidworks model
*.SLDPRT binary
*.SLDASM binary
@mastensg
mastensg / ctrlz.sh
Last active January 6, 2016 03:58
Use Ctrl-Z to resume
bind '"\C-z":" \C-u fg\C-j"'
trap "stty susp '^z'" DEBUG
PROMPT_COMMAND="stty susp ''"
@bendavis78
bendavis78 / gist:827089ff8f2a8d8975ee
Last active May 29, 2022 17:01
Installing Arch Linux on Chromebook Pixel 2
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" /><!-- This is an automatically generated file. -->
<TITLE>Bookmarks</TITLE>
<H1 LAST_MODIFIED="1396239625">Bookmarks for anarcat from SemanticScuttle</H1>
<DL>
<DT><A HREF="https://pond.imperialviolet.org" description="For secure, synchronous communication we have OTR and, when run over Tor, this is pretty good. But while we have secure asynchronous messaging in the form of PGP email, it's not forward secure and it gratuitously leaks traffic information. While a desire for forward secure PGP is hardly new, it still hasn't materialised in a widely usable manner.
Additionally, email is used predominately for insecure communications (mailing lists, etc) and is useful because it allows previously unconnected people to communicate as long as a (public) email address is known to one party. But the flip side to this is that volume and spam are driving people to use centralised email services. These provid
@myitcv
myitcv / time_travel_trigger.sql
Last active March 8, 2022 06:50
Trigger-based equivalent of old PostgreSQL time travel module - see https://blog.myitcv.io/2014/02/25/row-level-version-control-with-postgresql.html for more details
/*
Copyright (c) 2015 Paul Jolly <paul@myitcv.org.uk)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@tonyseek
tonyseek / README.rst
Last active November 5, 2022 15:20
Build Python binding of C++ library with cffi (PyPy/Py3K compatible)

Run with Python:

pip-2.7 install cffi
PYTHON=python2.7 sh go.sh

Run with PyPy:

pip-pypy install cffi
PYTHON=pypy sh go.sh
@stefanozanella
stefanozanella / cnxsoft.md
Last active June 12, 2023 23:05
Emulate a Raspberry Pi with Qemu+ KVM

Booting with CNXSoft image

Reference: http://www.cnx-software.com/2012/07/31/84-mb-minimal-raspbian-armhf-image-for-raspberry-pi/

curl -O https://dl.dropbox.com/u/45842273/2012-07-15-wheezy-raspian-minimal.img.7z

yum install p7zip
7za e 2012-07-15-wheezy-raspian-minimal.img.7z

qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1" -hda 2012-07-15-wheezy-raspian-minimal.img -net nic -net user -vnc :0 -net tap,ifname=vnet0,script=no,downscript=no