Skip to content

Instantly share code, notes, and snippets.

View cpl's full-sized avatar
📐
We meet upon the level; We part upon the square;

Αlexandru-Paul  Copil cpl

📐
We meet upon the level; We part upon the square;
View GitHub Profile
@cpl
cpl / README.md
Created September 11, 2017 04:54
A script that uninstalls any Python package given by `pip freeze` (or any other list)

How to use

  1. Download the pip_uninstall_all.py file
  2. Run pip freeze | python pip_uninstall_all.py

You can also use a text files with the packages you wish to uninstall and provide em using stdin

@cpl
cpl / genesis_public_key
Created February 8, 2018 12:55
genesis_public_key
049dd3545be65523308a4f49b2992047c9028be92cb46e3ccf46b552bd44af811464f600aaa3aa39ff06d9c4415b4db6203cf2af6df3e6f59386a18767fba420fc
@cpl
cpl / ad.py
Last active March 3, 2018 16:19
ad [beta]
#!/usr/bin/python
"""Create UNIX environment alias shortcuts."""
import sys
import os
from aluminium.utils import Paths
from aluminium.utils import initialize_config
STORE_FILE = os.path.join(Paths.CONFIG_DIR.value, 'ad', 'ads')
@cpl
cpl / include.sh
Created October 7, 2018 17:51
shell functions
sizeof() {echo "int main() { printf(\"%d\", sizeof($1)); }" | gcc -xc -w - && ./a.out}

Keybase proof

I hereby claim:

  • I am cpl on github.
  • I am cpl_li (https://keybase.io/cpl_li) on keybase.
  • I have a public key ASC4TOCVpZRU6tjIbFqo0JCWu6E_2K58Wzx8sqgfBHRAzAo

To claim this, I am signing this object:

@cpl
cpl / sbcd.txt
Created May 20, 2019 14:40
Uploads
Date : Monday, 20 May 2019
MD5 : 1125ead35eda40a3dd2a161eeb99e672
Size : 106.9 MB
Link : https://mega.nz/#!hS4HHKQS
@cpl
cpl / arduino_sound_lights.cpp
Created May 21, 2019 15:59
Arduino Sound LED Strip
#include <FastLED.h>
#define AUDIO_PIN A0
#define LEDST_PIN 5
#define LED_TYPE WS2811
#define BRIGHTNESS 100
#define NUM_LEDS 60
#define COLOR_ORDER GRB
@cpl
cpl / BLUETOOTH_HS-08_ZS040.cpp
Last active May 30, 2019 13:44
Arduino Bluetooth
#define TX 1
#define RX 0
#define LED 7
#define BUFFER_SIZE 16
char bufr[BUFFER_SIZE];
void setup(){
Serial.begin(9600);
pinMode(TX, OUTPUT);
@cpl
cpl / LICENSE
Last active August 27, 2019 14:06
A Script for compiling ```.java``` files in the COMP16121 Course for UoM Students.
MIT License
Copyright (c) 2016 Alexandru-Paul Copil (thee-engineer)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@cpl
cpl / honk.sh
Created November 23, 2019 18:16
HONK HONK
curl -o /tmp/goose.jpg -s https://cpl.li/assets/images/goose2.jpg >/dev/null
while true
do
say "honk!"
open -a Preview /tmp/goose.jpg
sleep $(( ( RANDOM % 300 ) + 1 ))
done