Skip to content

Instantly share code, notes, and snippets.

View moniquelive's full-sized avatar
🏳️‍⚧️

Cyber Oliveira moniquelive

🏳️‍⚧️
View GitHub Profile
@moniquelive
moniquelive / difm.csv
Created January 5, 2024 18:24
DI.fm csv file for Alfred workflow
00s club hits 2000's Club Hits 00sclubhits
ambient Ambient ambient
atmospheric breaks Atmospheric Breaks atmosphericbreaks
bassline Bassline bassline
bass n jackin house Bass and Jackin House bassnjackinhouse
big beat Big Beat bigbeat
big room house Big Room House bigroomhouse
breaks Breaks breaks
chilled m Chilled chilledm
chill hop Chill Hop chillhop
@moniquelive
moniquelive / scramble.py
Created October 24, 2021 02:56
Manually scramble a vector in python... because why not
from random import randint
v = [1, 2, 3, 4, 5, 6, 7, 8, 9]
def swap(v, f, t):
print(f, t)
v[f] ^= v[t]
v[t] ^= v[f]
v[f] ^= v[t]
@moniquelive
moniquelive / spoti.py
Created October 10, 2021 02:21
Snippet para fazer o ranking de contribuidores da nossa playlist
from collections import defaultdict
import spotipy
from spotipy.oauth2 import SpotifyClientCredentials
sp = spotipy.Spotify(auth_manager=SpotifyClientCredentials())
offset, limit = 0, 100
playlist_id = '6tPcPBeTEoPqaZcR03IzwN'
ranking = defaultdict(int)

Keybase proof

I hereby claim:

  • I am moniquelive on github.
  • I am cyberleo (https://keybase.io/cyberleo) on keybase.
  • I have a public key ASBjo7irIrNQlrV_Rj_nAk6r9elodoFIzz5gxBf_sBQnXgo

To claim this, I am signing this object:

@moniquelive
moniquelive / first_shader.elm
Created September 9, 2021 03:39
Nosso primeiro shader em ELM WebGL
-- Render a spinning cube.
--
-- Dependencies:
-- elm install elm-explorations/linear-algebra
-- elm install elm-explorations/webgl
--
import Browser
import Browser.Events as E
import Html exposing (Html)
@moniquelive
moniquelive / swap_on.sh
Created August 30, 2021 23:24
Liga swap no linux criando arquivo /swapfile1 de 2GB
sudo fallocate -l 2G /swapfile1
sudo mkswap /swapfile1
sudo chown root:root /swapfile1
sudo chmod 0600 /swapfile1
sudo swapon /swapfile1
echo "/swapfile1 none swap sw 0 0" | sudo tee -a /etc/fstab
augroup nasm " {
au!
au BufRead,BufNewFile *.asm set filetype=nasm
augroup END " }
@moniquelive
moniquelive / crawler.go
Created June 19, 2021 04:46
Crawler in Golang
package main
import (
"fmt"
"os"
"strings"
"github.com/anaskhan96/soup"
)
@moniquelive
moniquelive / ana.hs
Created June 12, 2021 05:48
Gerador de Anagramas
import Data.Char
import Data.List
ana :: String -> [String] -> [String]
ana word dict = let lw = length word
ps = (nub . permutations $ word)
in ps `intersect` filter (\w -> (length w) == lw) dict
main = do
putStrLn "Digite uma palavra: "
main = interact $ show . sum . bin2dec . reverse . dec2bin . read
where
dec2bin 0 = []
dec2bin n = dec2bin (n `div` 2) ++ [n `rem` 2]
bin2dec bs = let l = length bs
l1 = l - 1
l2 = l - 2
in zipWith (\a b -> a * 2 ^ b) bs [l1,l2..0]