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
#!/bin/sh | |
# http://download.redis.io/releases/ | |
# Usage: sh compile-redis-portable.sh | |
VERSION="4.0.6" | |
INIT_PATH=`dirname "$0"` | |
INIT_PATH=`( cd "$INIT_PATH" && pwd )` |
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
#!/bin/bash | |
# stop all containers | |
docker stop $(docker ps -q) | |
# delete all containers | |
docker rm $(docker ps -a -q) | |
# delete all images | |
docker rmi $(docker images -q) |
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
# nginx ➜ /etc/nginx/sites-available/default | |
location /static/ { | |
alias /path-to-static-content/; | |
autoindex off; | |
charset utf-8; | |
gzip on; | |
gzip_types text/plain application/javascript application/x-javascript text/javascript text/xml text/css; | |
location ~* \.(ico|gif|jpeg|jpg|png|woff|ttf|otf|svg|woff2|eot)$ { | |
expires 1y; | |
add_header Pragma public; |
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
# python ➜ bottlepy web micro-framework | |
response = bottle.HTTPResponse(status=302) | |
response.set_header("Cache-Control", "no-store, no-cache, must-revalidate") | |
response.set_header("Expires", "Thu, 01 Jan 1970 00:00:00 GMT") | |
response.set_header("Location", url) | |
return response |
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
# replace IP with the ip of your newly created droplet | |
ssh root@IP | |
# this will install utilities for mounting storage objects as FUSE | |
apt install s3fs | |
# we now need to provide credentials (access key we created earlier) | |
# replace KEY and SECRET with your own credentials but leave the colon between them | |
# we also need to set proper permissions | |
echo "KEY:SECRET" > .passwd-s3fs |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Spartan UI Kit</title> |
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
#!/usr/bin/env bash | |
# Instructions | |
# - Copy contents of this script to a file `wowtga2png.sh`. | |
# - Make the script executable with `chmod +x wowtga2png.sh`. | |
# - Check that the paths of WOW_DIR and OUT_DIR are correct and use absolute paths for directories. | |
# - In Lutris: | |
# - Click on the game and select "Configure". | |
# - Toggle "Advance" in the dialog that just popped up. | |
# - Go to "System Options" tab and scroll down to "Post-exit script". |
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
<?xml version='1.0' encoding='utf-8'?> | |
<opml version="1.0"> | |
<head /> | |
<body> | |
<outline text="https://xeiaso.net" type="rss" xmlUrl="https://xeiaso.net/blog.rss" /> | |
<outline text="https://fasterthanli.me/" type="rss" | |
xmlUrl="https://fasterthanli.me/index.xml" /> | |
<outline text="https://matt-rickard.com" type="rss" xmlUrl="/rss/" /> | |
<outline text="https://jmmv.dev/" type="rss" xmlUrl="/feed.xml" /> | |
<outline text="https://paulstamatiou.com" type="rss" |
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
################################################################### | |
Writing C software without the standard library | |
Linux Edition | |
################################################################### | |
There are many tutorials on the web that explain how to build a | |
simple hello world in C without the libc on AMD64, but most of them | |
stop there. | |
I will provide a more complete explanation that will allow you to | |
build yourself a little framework to write more complex programs. |