Skip to content

Instantly share code, notes, and snippets.

@valinet
valinet / toast1.c
Created December 21, 2020 19:22
Send a toast notification in Windows 10 using plain C
// Send toast notifications in Windows 10, using Windows Runtime,
// without any language projection, in PLAIN C
// Copyright (c) 2021 Valentin - Gabriel Radu
//
// MIT License
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this softwareand 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
@DenisRitchie
DenisRitchie / settings.json
Last active February 19, 2024 03:14
Pelles C IDE - Visual Studio Code Configurations
//
// https://code.visualstudio.com/docs/cpp/c-cpp-properties-schema-reference
//
{
"editor.tabSize": 2,
"editor.tabCompletion": "on",
"editor.insertSpaces": true,
"editor.trimAutoWhitespace": true,
"editor.letterSpacing": 0,
"editor.autoIndent": "advanced",
@nuhuo08
nuhuo08 / shadowsocks_ubuntu1604.org
Created March 11, 2019 09:44
Install Shadowsocks-libev + simple-obfs on Ubuntu 16.04

Install Shadowsocks-libev + simple-obfs on Ubuntu 16.04

Install shadowsocks-libev via Ubuntu PPA

sudo apt-get install software-properties-common -y
sudo add-apt-repository ppa:max-c-lv/shadowsocks-libev -y
sudo apt-get update
sudo apt install shadowsocks-libev
@hermanbanken
hermanbanken / Dockerfile
Last active April 22, 2024 10:53
Compiling NGINX module as dynamic module for use in docker
FROM nginx:alpine AS builder
# nginx:alpine contains NGINX_VERSION environment variable, like so:
# ENV NGINX_VERSION 1.15.0
# Our NCHAN version
ENV NCHAN_VERSION 1.1.15
# Download sources
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \
@jesugmz
jesugmz / Dockerfile
Last active October 23, 2021 21:25
Example how to build Docker multi-stage image using official PHP and Composer images
ARG PHP_VERSION=7.2-fpm-stretch
ARG COMPOSER_VERSION=latest
# builder stage
FROM php:$PHP_VERSION AS builder
ARG AMQP_VERSION=1.9.3
ARG PHPREDIS_VERSION=4.1.1
RUN apt-get update && apt-get install -y --no-install-recommends --no-install-suggests \
@tristanwietsma
tristanwietsma / auth.go
Created May 15, 2014 04:15
Golang web server example
package main
import (
"encoding/base64"
"net/http"
"strings"
)
type handler func(w http.ResponseWriter, r *http.Request)