Skip to content

Instantly share code, notes, and snippets.

View concatime's full-sized avatar

Issam Maghni concatime

  • Montréal, QC.
View GitHub Profile
#include <stdio.h> /* fputs, printf, puts, stderr */
#include <stdlib.h> /* EXIT_FAILURE, EXIT_SUCCESS, exit */
#include <sys/resource.h> /* RLIM_INFINITY, RLIMIT_RTPRIO, getrlimit, setrlimit, struct rlimit */
#include <unistd.h> /* pause */
int main(void) {
struct rlimit rtprio;
if (getrlimit(RLIMIT_RTPRIO, &rtprio)) {
fputs("failed to get cur/soft rtprio\n", stderr);
@concatime
concatime / index.html
Last active April 30, 2024 06:05
SVG to image to canvas to PNG/JPEG/... (URI/URL and Blob)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<svg height=500 width=500>
<circle cx=250 cy=250 r=200 stroke="black" stroke-width=3 fill="red" />
Sorry, your browser does not support inline SVG.

apt-transport-https

First, if you are on Ubuntu Cosmic, you need to manually compile json-c because the version provided is 0.12.1, but sway requires at least version 0.13. It is pretty straight forward, so take a look here.

Then, we need to install common dependencies between wlroots and sway-1.0.

sudo apt install gcc pkgconf meson ninja-build libwayland-dev libinput-dev libcap-dev

Secondly, we need to install wlroots dependencies.

import java.util.ArrayList;
interface Solver
{
byte INDEX = 73; // Nième valeur recherchée
static void main(final String... args) {
buffer.add(6d); // 0
buffer.add(-16d); // 1
buffer.add(396d); // 2
# WATCHOUT, THIS WILL ERASE YOUR .VIMRC & TESTED ONLY UNDER UBUNTU 17.10
LJVER=2.1.0-beta3 # LuaJIT
VMVER=8.0 # VIM
CFLAGS+=-pipe
MAKEFLAGS+=-j`nproc`
CC=clang
[ -z $1 ] || { CC=$1; }
export CC CFLAGS MAKEFLAGS
set -e
GOVER=1.9.1
curl https://storage.googleapis.com/golang/go$GOVER.linux-amd64.tar.gz --silent | sudo tar xzC /usr/local
cd
echo . \~/.goenv >> .bashrc
cat > .goenv <<EOT
for i in /usr/local/go ~/go
do PATH+=:\$i/bin
done
export PATH
GOCODE=\$(go env GOPATH)
@concatime
concatime / google_encrypted.xml
Last active August 20, 2017 17:13
Google Encrypted for Firefox Raw
<OpenSearchDescription xmlns='http://a9.com/-/spec/opensearch/1.1/' xmlns:moz='http://www.mozilla.org/2006/browser/search/'>
<ShortName>Google Encrypted</ShortName>
<Description>Enhanced Google search</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width='16' height='16'>
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAHqklEQVR4Ae2dVXgbSRaFe5lelnnfluFlmCnMzMzMzMwMCjPMKOsxM7MVh5kTc0AMJePDWd+dT172WupuVXVc+b4zwZF0/9N1763qVpUS+AHgSzU1NWOrq6vPN8rr9/shihhj6v8fziKmxJYYE2sACon+Q/pp419mGAi4oQ0h1sQ8YMCXeMMnOPzfk4sJX1Iah8Q4AYNvFYZQOlIoL/EPtHWaQOwVfgVXitgrrfVqFyUGRcLnG4uix4cVH744cSl8A5NSZLrhG7Mi4fONXZHwuZjAvwZIiW+ANECmHf3ZKKLDZ3YbvJZ8uE8cgmP5PDhmjoN9zADY+nWCtdN7sLZ/C7Yen8A2oDMc4weD/o3rwE54kuPAykuFN0EREb7v3h249u+EfXR/WNu+AWub10OWbXB3OLeuhfeihb8JItcAZrXCE3EW9olDCZwuolFCI4lZX8gi3CS3C+4zx2Dr2YYghUddPoDLtI1M528At9TDGDyxn9NVSVC4yNa7HdxRZq6piIsBvopyOGZNIAhCyLloBqUl/gaEA74nJwO2Xm0pcKFkG9IDvlvXw26CEk74LtN2ClZYUVvriY/SwwTORZgxuDavpiDFV8d34Htw7yXqgnw+ONcsNgx8b17Wy9WGOlfOl/B5GeA6fkDCD9YArYo

H2Ø WIZARD

Features of h2o_wizard:

  • Bleading Edge ;
  • Compiled from scratch;
  • Based on static libraries ;
  • LibreSSL as SSL library ;

This script is provided AS IS & comes with ABSOLUTELY NO WARRANTY!

Instructions

@concatime
concatime / .md
Last active April 19, 2018 21:41
ngx_wizard

[DEPRECATED] Take a look at H2O webserver.

NGiИX WIZARD

Features of ngx_wizard:

  • Optimized nginx ;
  • Tweaked settings ;
  • Bleading Edge ;
  • Self Contained Package ;
  • Compiled from scratch ;
  • Based on shared libraries ;
#
# The script will ask you some questions when rendering the private key.
#
OPENSSL=openssl-1.1.0g
CFLAGS+=-pipe
MAKEFLAGS+=-j`nproc`
CPATH=/opt/openssl/include
LIBRARY_PATH=/opt/openssl/lib
export CFLAGS MAKEFLAGS LIBRARY_PATH CPATH
set -e