Skip to content

Instantly share code, notes, and snippets.

View chfle's full-sized avatar
👨‍💻

Christian Lehnert chfle

👨‍💻
View GitHub Profile
!function(r){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.uuidv4=r()}}(function(){return function r(e,n,t){function o(f,u){if(!n[f]){if(!e[f]){var a="function"==typeof require&&require;if(!u&&a)return a(f,!0);if(i)return i(f,!0);var d=new Error("Cannot find module '"+f+"'");throw d.code="MODULE_NOT_FOUND",d}var p=n[f]={exports:{}};e[f][0].call(p.exports,function(r){var n=e[f][1][r];return o(n?n:r)},p,p.exports,r,e,n,t)}return n[f].exports}for(var i="function"==typeof require&&require,f=0;f<t.length;f++)o(t[f]);return o}({1:[function(r,e,n){function t(r,e){var n=e||0,t=o;return t[r[n++]]+t[r[n++]]+t[r[n++]]+t[r[n++]]+"-"+t[r[n++]]+t[r[n++]]+"-"+t[r[n++]]+t[r[n++]]+"-"+t[r[n++]]+t[r[n++]]+"-"+t[r[n++]]+t[r[n++]]+t[r[n++]]+t[r[n++]]+t[r[n++]]+t[r[n++]]}for(var o=[],i=0;i<256;++i)o[i]=(i+256).toString(16).subs
@chfle
chfle / Elixir schema
Created January 6, 2019 13:48
Elixir schema for IntelliJ IDEA
<scheme name="Darcula" version="142" parent_scheme="Darcula">
<metaInfo>
<property name="created">2019-01-06T05:46:20</property>
<property name="ide">idea</property>
<property name="ideVersion">2018.3.2.0.0</property>
<property name="modified">2019-01-06T05:46:40</property>
<property name="originalScheme">_@user_Darcula</property>
</metaInfo>
<colors>
<option name="FILESTATUS_ADDED" value="a9dc76" />
@chfle
chfle / logger
Last active January 15, 2019 13:33
logger python for IntelliJ IDEA
import logging
logging.basicConfig(
format='%(asctime)s '
'[%(filename)s]:'
'%(lineno)d] [%(levelname)s] '
'[%(funcName)s():%(lineno)s] '
'[PID:%(process)d TID:%(thread)d]: '
'%(message)s',
level=logging.DEBUG,
filename='logs.txt')
@chfle
chfle / user_validation.py
Last active January 24, 2019 13:07
Python Class for user validation
""" User validation class"""
from abc import ABC, abstractmethod
import re
class UserValidation(ABC):
def __init__(self, username, email, password):
self.username = username
self.email = email
@chfle
chfle / CMakeListsQT5
Created June 29, 2019 12:43
CMakeLists.txt with QT5
# Add this in Clion: Preferences | Build, Execution, Deployment | CMake | Cmake options: -DCMAKE_PREFIX_PATH=/Users/username/Qt/QT_VERSION/clang_64/lib/cmake
# CMAKE STANDART
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
# INPORTANT
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
@chfle
chfle / .vimrc
Last active July 25, 2020 18:02
.vimrc
" Specify a directory for plugins
" - For Neovim: stdpath('data') . '/plugged'
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
" Make sure you use single quotes
Plug 'airblade/vim-gitgutter'
Plug 'itchyny/lightline.vim'
Plug 'dracula/vim', { 'as': 'dracula' }
" Initialize plugin system
@chfle
chfle / build.gradle
Created September 29, 2020 15:40
build.gradle bukkit template for plugins
plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.3.72'
id 'com.github.johnrengelman.shadow' version '2.0.4'
}
group 'org.example'
version '1.0-SNAPSHOT'
@chfle
chfle / basic.s
Created October 29, 2020 18:10
basic at&t asm program
.text
.data
.global main
main:
movl $1, %esi
movl $4, %eax # sys_write
movl $1, %ebx # stdout
cmp $1, %esi
@chfle
chfle / looping.s
Last active October 30, 2020 13:16
looping att asm
.text
.data
.global main
main:
movl $5, %ecx # loop 5 times
looping:
@chfle
chfle / .vimrc
Last active February 7, 2021 08:00
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
" Specify a directory for plugins
" - For Neovim: stdpath('data') . '/plugged'
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')