Skip to content

Instantly share code, notes, and snippets.

View Cxarli's full-sized avatar
πŸ”“
'; DROP TABLE bugs --

Charlie Cxarli

πŸ”“
'; DROP TABLE bugs --
View GitHub Profile
@Cxarli
Cxarli / main.lisp
Last active February 22, 2017 23:18
;; Constants
;;; TICK: The time between renders
(setf TICK 0.5)
;; Symbols
(setq WALL '\#)
(setq PEMP '\ )
(setq PDOT '\.)
(setq PILL '*)
#!/bin/fish
set cookie (nget -l 11 -- -S 2>&1 | grep Set-Cookie | sed -E 's/.+data=([a-zA-Z0-9%]+).*/\1/g' | urldecode)
echo "Cookie: $cookie" >&2
set file (mktemp "XXXXXXXX.php")
set tmp_file (mktemp "XXXXXXXX.php")
@Cxarli
Cxarli / glxinfo output
Created September 10, 2017 14:49
glxinfo output
name of display: :0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
GLX_ARB_create_context, GLX_ARB_create_context_profile,
GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample,
GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,
@Cxarli
Cxarli / recently updated packages
Created September 10, 2017 15:03
recently updated packages
[2017-09-09 13:09] [ALPM] upgraded linux-api-headers (4.10.1-1 -> 4.12.7-1)
[2017-09-09 13:09] [ALPM] upgraded glibc (2.25-7 -> 2.26-3)
[2017-09-09 13:09] [ALPM] upgraded gcc-libs (7.1.1-4 -> 7.2.0-2)
[2017-09-09 13:09] [ALPM] upgraded ncurses (6.0+20170527-1 -> 6.0+20170902-1)
[2017-09-09 13:09] [ALPM] upgraded android-tools (8.0.0_r4-1 -> 8.0.0_r4-2)
[2017-09-09 13:09] [ALPM] upgraded babl (0.1.24-1 -> 0.1.30-1)
[2017-09-09 13:09] [ALPM] upgraded binutils (2.28.0-4 -> 2.29.0-1)
[2017-09-09 13:09] [ALPM] upgraded p11-kit (0.23.7-1 -> 0.23.8-1)
[2017-09-09 13:09] [ALPM] upgraded expat (2.2.3-1 -> 2.2.4-1)
[2017-09-09 13:09] [ALPM] upgraded libxml2 (2.9.5rc2+0+g69936b12-1 -> 2.9.5+6+g07e227ed-1)
@Cxarli
Cxarli / glutin version tree
Last active September 21, 2017 17:21
Glutin v0.9.2 version tree
$ cargo tree -p glutin # https://github.com/sfackler/cargo-tree
glutin v0.9.2
β”œβ”€β”€ lazy_static v0.2.8
β”œβ”€β”€ libc v0.2.31
β”œβ”€β”€ osmesa-sys v0.1.2
β”‚ └── shared_library v0.1.7
β”‚ β”œβ”€β”€ lazy_static v0.2.8 (*)
β”‚ └── libc v0.2.31 (*)
β”œβ”€β”€ shared_library v0.1.7 (*)
@Cxarli
Cxarli / Makefile
Created December 13, 2017 23:09
Makefile with GCC and Clang, ASAN, Valgrind and some other nice things
# The path of the executable
OUTPUT_EXEC = build/main
# Use clang by default
CC = clang
# Flags for Clang
CFLAGS = -O0 -g -Weverything
# Flags for GCC
@Cxarli
Cxarli / php-toggle-ext.sh
Last active January 9, 2018 22:31
Toggle a PHP extension
#!/bin/bash
###
### MAKE BACK-UPS
### I AM NOT RESPONSIBLE
### MAKE BACK-UPS
### DON'T USE REGEXES
### MAKE BACK-UPS
### D O N O T U S E R E G E X E S
0 4 0 7 0 14 24 0 0 6 0 17 10 19 5 0 0 3 0 0 20 0 23 15 0
13 20 17 10 2 0 0 0 0 0 0 15 0 0 0 6 0 5 0 23 0 0 16 19 18
0 22 0 0 0 17 0 0 25 0 0 0 9 0 11 7 0 12 0 19 3 0 24 8 10
24 12 0 3 0 18 20 0 5 0 0 4 0 0 23 14 10 11 0 22 0 0 0 0 0
0 18 0 0 0 10 22 0 15 21 0 20 3 0 6 2 0 8 0 0 0 0 7 0 12
16 0 15 8 22 0 0 0 9 0 0 0 0 6 0 0 25 0 7 0 0 10 1 17 0
7 0 0 23 11 0 16 6 19 0 4 0 5 24 13 0 12 21 0 20 0 0 0 0 0
0 0 0 0 0 0 18 0 7 0 25 0 2 12 0 0 24 0 5 0 14 11 20 4 16
0 0 20 14 19 11 10 5 0 2 0 0 0 0 0 0 15 4 8 6 0 13 0 0 0
4 0 0 0 13 0 0 0 23 0 20 22 15 11 0 0 0 0 0 0 12 7 6 25 0
import sys
from math import sqrt
errors = 0
def is_uniq(lst):
return len(list(set(lst))) is len(lst)
@Cxarli
Cxarli / pascal_triangle.c
Created May 31, 2018 20:27
My implementation of the pascal triangle
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
/// Get the n-th row of the pascal triangle
/// NOTE: This is a pure, recursive function without caching
/// n: the nth row to calculate
/// row: the pointer to an array with n+1 elements to store the row in