Skip to content

Instantly share code, notes, and snippets.

View skydevht's full-sized avatar

Holy-Elie Scaïde skydevht

View GitHub Profile
import LocalService from './services/local';
import PrismicService from './services/prismic';
let service = PrismicService;
export const Service = service;
export const FacebookUrl = 'https://web.facebook.com/holy1400';
export const GithubUrl = 'https://github.com/Skyd1400';
#!/usr/bin/python
# coding: utf8
import urllib2
import json
categories = json.loads(urllib2.urlopen("http://haitiz.com/webServiceApp/json/categories.php").read())["info"]
print("Choisissez votre catégorie :")
for idx, category in enumerate(categories):
print(str(idx)+"-"+category["nom_categorie"])
@skydevht
skydevht / defi_jan.py
Created January 14, 2018 19:21
Defi mwa janvye an: A pati de yon list chif "1234567890", repwodwi pye bwa sa jan li ye a (Yon pye bwa ki fèt ak lèt nan lis chif la)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Python 3
ch = input('Chiffre: ') #ch ap stoke chif yo sou fòm chèn
n = len(ch) # n ap itilize valè sa ki se konbye chif
for i in range(n): # n ap gen pou afiche n liyn
pad = ' ' * (n - (i + 1)) # sa se pou kalkile e stoke fòs espas nou ap bezwen
a = ch[0: i+1] # nou pran chif n ap bezwen yo selman
@skydevht
skydevht / after:ftplugin:javascript.vim
Last active May 8, 2020 16:45
My Neovim configuration
set foldmethod=syntax
set foldnestmax=10
set nofoldenable
set foldlevel=2
setlocal makeprg=yarn\ --silent\ eslint\ --format\ compact\ --fix
setlocal formatprg=yarn\ --silent\ prettier\ --stdin-filepath\ %
setlocal autoread
augroup JS
@skydevht
skydevht / sim.asm
Last active September 23, 2019 20:20
mov tmod, #10h ; set timer 1 to 16bit
verif:
mov p2, #0ffh ; set p2 as input
mov acc, p2; read p2 into the acc
jb 0e4h, ll; jump if first bit of sensor 1 is not set (empty)
anl acc, #41h; isolate s and sensor 1 bits
xrl acc, #41h ; acc will clear if s and sensor 1 first bit is set
jz lm1 ; jump if acc is zero
jmp verif; loop verification
ll:
@skydevht
skydevht / download.sh
Created November 10, 2020 21:34
Leagues of Legends Art
wget http://screensaver.riotgames.com/latest/content/data.json
jq -r -f filter.jq data.json > down.txt
aria2c -c -i down.txt
@skydevht
skydevht / karabiner.edn
Created February 22, 2021 15:47
Crakle Layout with Karabiner
{:profiles {:goku {:default true}},
:devices {:ducky [{:vendor_id 1046, :product_id 291}],
:elecom [{:vendor_id 1390, :product_id 305}]},
:simlayers {:w-mode {:key :w}},
:templates {:alfred "osascript -e 'tell application \"Alfred 4\" to run trigger \"%s\" in workflow \"%s\" with argument \"%s\"'",
:km "osascript -e 'tell application \"Keyboard Maestro Engine\" to do script \"%s\"'",
:swinsian "osascript -e 'tell application \"Swinsian\" to %s'",
:open "open \"%s\""},
:main [{:des "ducky cmd alt",
:rules [[:##left_command :##left_option [:ducky]]
@skydevht
skydevht / madsen.clj
Last active September 24, 2022 01:59
(defn fill-rank [cnt score ranks]
(concat (repeat cnt score ranks)))
(defn climbingLeaderboard [ranked player]
(vec (loop
;; the following define our state for the iteration
[rem-rkd ranked ; remaining ranked scores to go through
lts-rkd (first ranked); previous ranked score
rem-pl player ; remaining player to go through
lst-rnk 1 ; latest rank
@skydevht
skydevht / init.el
Last active October 16, 2022 20:12
Emacs Config
;; Increase garbage collection and file limits
(setq gc-cons-threshold 50000000)
(setq large-file-warning-threshold 100000000)
;; Initialize package sources
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(add-to-list 'package-archives