Skip to content

Instantly share code, notes, and snippets.

View NuLL3rr0r's full-sized avatar
๐Ÿ’ญ
I may be slow to respond.

Mamadou Babaei NuLL3rr0r

๐Ÿ’ญ
I may be slow to respond.
View GitHub Profile
@ambroisemaupate
ambroisemaupate / security.conf
Last active July 22, 2025 15:18
Nginx CSP example
# config to don't allow the browser to render the page inside an frame or iframe
# and avoid clickjacking http://en.wikipedia.org/wiki/Clickjacking
# if you need to allow [i]frames, you can use SAMEORIGIN or even set an uri with ALLOW-FROM uri
# https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options
add_header X-Frame-Options SAMEORIGIN;
# when serving user-supplied content, include a X-Content-Type-Options: nosniff header along with the Content-Type: header,
# to disable content-type sniffing on some browsers.
# https://www.owasp.org/index.php/List_of_useful_HTTP_headers
# currently suppoorted in IE > 8 http://blogs.msdn.com/b/ie/archive/2008/09/02/ie8-security-part-vi-beta-2-update.aspx
@kevinmehall
kevinmehall / rust-cross-libs.sh
Last active November 3, 2023 13:23
Cross-compile Rust standard library for Tessel without full bootstrap build [A work in progress]
#!/bin/bash
# THIS IS A GIANT HACK
# if you think this would be a good idea if it weren't so terrible, go read https://github.com/rust-lang/rfcs/pull/1133
set -e
# Parse args
for i in "$@"
do
@TheGU
TheGU / uploader.go
Created September 11, 2015 10:07
Golang to upload file to google drive with progress bar using Google API
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/url"
"os"
@mottosso
mottosso / alt.qml
Last active January 3, 2024 09:40
Animated text in QML
import QtQuick 2.0
/*!
An alternative implementation,
this one causes a binding loop for some reason.
*/
Rectangle {
width: 500
height: 300
@AntoineAugusti
AntoineAugusti / limitConcurrentGoroutines.go
Last active July 30, 2024 17:58
Limit the maximum number of goroutines running at the same time
package main
import (
"flag"
"fmt"
"time"
)
// Fake a long and difficult work.
func DoWork() {
@eddie-chinbat
eddie-chinbat / twitterstreaming.cpp
Last active October 18, 2019 00:43
Twitter streaming API example on c++
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <oauth.h>
#include <curl/curl.h>
#include <ncurses.h>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/property_tree/ptree.hpp>
@bkaradzic
bkaradzic / orthodoxc++.md
Last active November 3, 2025 04:11
Orthodox C++

Orthodox C++

This article has been updated and is available here.

@SirJackblue
SirJackblue / start.bat
Created March 7, 2016 08:45
Simple batch file to launch an Unreal Engine 4 client or server or both of them :)
::Author: Jackblue
@echo off
:: Editable Variable
set "PROJECT_NAME=YourProjectName"
set UE_PATH="C:\path\to\your\unreal engine\UE4Editor.exe" ::By default : C:\Program Files\Epic Games\4.x\Engine\Binaries\Win64\UE4Editor.exe
set PROJECT_PATH="C:\path\to\your\YourProjectName.uproject"
:: You can edit arguments here (docs : https://docs.unrealengine.com/latest/INT/Programming/Basics/CommandLineArguments/index.html)
set "SERVER_COMMAND=%UE_PATH% %PROJECT_PATH% -server -log"
set "CLIENT_COMMAND=%UE_PATH% %PROJECT_PATH% -game -log"
@faberyx
faberyx / c++ daemon
Last active December 21, 2021 19:59
#include <stdio.h>
#include <signal.h>
#include <syslog.h>
#include <errno.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>