Skip to content

Instantly share code, notes, and snippets.

View jgonet's full-sized avatar
🍉
Watermelon

Jakub Gonet jgonet

🍉
Watermelon
View GitHub Profile
@jgonet
jgonet / rn-nuke.sh
Created August 11, 2020 09:00
Nuke RN project
#!/bin/bash
# Taken from https://github.com/react-native-community/discussions-and-proposals/issues/134#issuecomment-554330540 by @ifyapishore
# clean react-native
echo 'clean watchman'
watchman watch-del-all
echo 'clean node_modules'
rm -rf node_modules
echo 'clean caches'
rm -rf $TMPDIR/haste-map-react-native-packager-*
rm -rf $TMPDIR/react-native-packager-cache-*
@jgonet
jgonet / find_max.cpp
Created January 31, 2020 00:42
Find max number
This file has been truncated, but you can view the full file.
#include <iostream>
#include <cstdlib>
int find_max(int array[], int size);
int main(int argc, char **argv) {
int *array = new int[argc];
for(int i = 0; i < argc-1; ++i){
array[i] = atoi(argv[i+1]);
@jgonet
jgonet / motiv.py
Created April 23, 2018 19:50
Keeps you motivated :>
from random import choice
from pathlib import Path
projects = []
try:
home = str(Path.home())
with open(home+'/.projects.txt') as f:
projects = f.readlines()
except FileNotFoundError:
projects.append("nothing ffs")
@jgonet
jgonet / conky.rc
Created April 23, 2018 19:47
My conky conf
conky.config = {
double_buffer = true,
alignment = 'top_right',
background = true,
border_width = 0,
cpu_avg_samples = 2,
default_color = 'ffffff',
default_outline_color = '000000',
default_shade_color = 'ffffff',
draw_borders = false,
@jgonet
jgonet / flash.sh
Created January 11, 2018 09:47
Simple compile/flash script for AVR
#!/bin/bash -e
# Author: Jakub Gonet, 2018
#
# This program is used to compile all *.c/*.cpp files
# present in passed directory to .hex file. Also, generated
# .hex file can be automatically flashed into uC using avrdude.
OPTIND=1 #POSIX var, resets when getopts was used in shell
#---> variables <---#