Skip to content

Instantly share code, notes, and snippets.

View kdridi's full-sized avatar
🙃
Focusing

Karim DRIDI kdridi

🙃
Focusing
  • Ubisoft
  • Montpellier, FRANCE
  • X @kdridi
View GitHub Profile
[{"username":"Dragor","content":"How to free up internal storage? I'm so mad because I waited for more than 30 minutes to update flipper through bluetooth and it didn't update."},{"username":"fornke","content":"dfu restore"},{"username":"canadiansike","content":"If you have access to a computer you can delete the files in internal that way, I’m unsure about mobile app having that ability"},{"username":"fornke","content":"dont update using bluetooth, use qflipper"},{"username":"Dragor","content":"I'm not able to update for next few days"},{"username":"canadiansike","content":"Ooof"},{"username":"Oliverkayak","content":"What can I improve with these cc1101 and NRF24 cases?"},{"username":"canadiansike","content":"Definitely remove the gap from the orange one"},{"username":"canadiansike","content":"Shouldn’t put pressure directly on the board"},{"username":"lilyf0x","content":"round the corner, it looks more like shark fin"},{"username":"canadiansike","content":"Hello lily!"},{"username":"lilyf0x","content":"but
#!/usr/bin/env bash
set -e
export DEBIAN_FRONTEND=noninteractive
instal_apt_file() {
sudo apt update
sudo apt install -y apt-utils
sudo apt upgrade -y
mySucc :: Int -> Int
mySucc a = a + 1
mySucc' :: Int -> Int
mySucc' = \a -> a + 1
myIsNeg'''' :: Int -> Bool
myIsNeg'''' a = 0 <= a
myIsNeg''' :: Int -> Bool
const compose = (g) => (f) => (x) => g(f(x))
const flip = (f) => (a) => (b) => f(b)(a)
const rec = (f) => (...args) => f((...args) => rec(f)(...args), ...args)
const listCons = (x) => (y) => (m) => m(x)(y)
const listHead = (z) => z((p) => (_) => p)
const listTail = (z) => z((_) => (q) => q)
const listCase = (f) => (n) => (z) => (z === null ? n : f(listHead(z))(listTail(z)))
const map = (f) => listCase((h) => (t) => listCons(f(h))(map(f)(t)))(null)
# mkdir Examples && python spritething.py 13 30 1900
# https://medium.freecodecamp.org/how-to-create-generative-art-in-less-than-100-lines-of-code-d37f379859f
import PIL, random, sys
from PIL import Image, ImageDraw
origDimension = 1500
r = lambda: random.randint(50,215)
rc = lambda: (r(), r(), r())
@kdridi
kdridi / main.lsp
Last active December 17, 2018 12:42
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; read_str
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; (println
; (+ 1 2)
; "Hello, world"
; nil true false)
;
; tokenize => ['(', 'println', '(', '+', '1', '2', ')', '"Hello, world"', 'nil', 'true', 'false', ')']
; read => [ Symbol("println"), [ Symbol("+"), 1, 2 ], "Hello, world", null, true, false ]
#include <criterion/criterion.h>
#include <tuple>
#include <stack>
#include <string>
#include <sstream>
#include <functional>
typedef enum e_tree
{
@kdridi
kdridi / pre-commit
Created October 5, 2017 22:55
.git/hooks/pre-commit
#!/usr/bin/env bash
################################################################################
echo -n "Object files: "
################################################################################
if test -f *.o; then
echo "KO"
exit 84
else
echo "OK"
#define BYTES_PER_PIXEL 4
typedef struct s_my_framebuffer
{
unsigned int width;
unsigned int height;
sfUint8 pixels[1];
} t_my_framebuffer;
t_my_framebuffer* my_framebuffer_create(unsigned int width, unsigned int height)
/* Import dependencies, declare constants */
var fs = require('fs');
var path = require('path');
var XlsxTemplate = require('xlsx-template');
/**
* Your function call
* @param {Object} params Execution parameters
* Members
* - {Array} args Arguments passed to function