Skip to content

Instantly share code, notes, and snippets.

View tete2soja's full-sized avatar
🦄
making some magic

Nicolas Le Gall tete2soja

🦄
making some magic
View GitHub Profile
@tete2soja
tete2soja / gist:1895a06d986544e02188
Created December 5, 2015 01:03 — forked from evildmp/gist:3094281
Set up Django, nginx and uwsgi

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

### Keybase proof
I hereby claim:
* I am darkitty on github.
* I am nlegall (https://keybase.io/nlegall) on keybase.
* I have a public key ASBv7c8B0paie9wvUeqeWh0bH5cdpqKnkyQqbN45o-7dywo
To claim this, I am signing this object:
@tete2soja
tete2soja / Makefile
Created September 13, 2016 13:56
Makefile for pandoc
# Produce PDFs from all Markdown files in a directory
# List files to be made by finding all *.md files and appending .pdf
PDFS := $(patsubst %.md,%.pdf,$(wildcard *.md))
# The all rule makes all the PDF files listed
all : $(PDFS)
# This generic rule accepts PDF targets with corresponding Markdown
# source, and makes them using pandoc
@tete2soja
tete2soja / slack.py
Last active December 17, 2016 19:37
slack_headphones
class SLACKER(object):
def notify(self, message, status)
if not headphones.CONFIG.SLACK_ENABLED:
return
import requests
SLACK_URL = headphones.CONFIG.SLACK_URL
channel = headphones.CONFIG.SLACK_CHANNEL
@tete2soja
tete2soja / teams-chat-post.sh
Last active November 24, 2022 09:23 — forked from chusiang/teams-chat-post-for-workflows.sh
Post a message to Microsoft Teams with bash script.
#!/bin/sh
# =============================================================================
# Author: Chu-Siang Lai / chusiang (at) drx.tw
# Filename: teams-chat-post.sh
# Modified: 2018-03-28 15:04
# Description: Post a message to Microsoft Teams.
# Reference:
#
# - https://gist.github.com/chusiang/895f6406fbf9285c58ad0a3ace13d025
#
@tete2soja
tete2soja / rot.py
Created July 7, 2019 20:17
ROT Brute force python script
from sys import argv
message = argv[1]
LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
letters = 'abcdefghijklmnopqrstuvwxyz'
for key in range(26):
translated = ''
for letter in message:
if letter.isupper():
<?php
$fp = fopen('/tmp/esd.txt', 'aw');
fwrite($fp, $_GET["u"]."\n");
fclose($fp);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css" integrity="sha256-2YQRJMXD7pIAPHiXr0s+vlRWA7GYJEK0ARns7k2sbHY=" crossorigin="anonymous" />
<?php
if(isset($_POST['name'])) {
$name = $_POST['name'];
$replyto = $_POST['replyTo'];
$message = $_POST['message'];
$to = 'zkw48824@zzrgg.com';
$subject = 'My Subject';
// Set SMTP headers
$headers = "From: $name \n" .
"Reply-To: $replyto";
@tete2soja
tete2soja / valetudo.conf
Created December 13, 2021 11:40
valetudo.conf
#!upstart
description "Valetudo"
env VALETUDO_CONFIG_PATH=/mnt/data/valetudo/valetudo_config.json
start on started network-interface INTERFACE=wlan0
stop on runlevel [06]
oom score 1000
exec /usr/local/bin/valetudo
@tete2soja
tete2soja / rc.local
Created December 13, 2021 11:41
valetudo_rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.