Skip to content

Instantly share code, notes, and snippets.

View dkuku's full-sized avatar

Daniel Kukula dkuku

View GitHub Profile
@dkuku
dkuku / FR_EXP.c
Created July 14, 2011 09:38 — forked from RickKimball/FR_EXP.c
MSP-EXP430FR5739 - Demo program modified for msp430-gcc uniarch
/*******************************************************************************
*
* FR_EXP.c
* User Experience Code for the MSP-EXP430FR5739
* C Functions File
*
* Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
@dkuku
dkuku / 10-sync-acpi-intel.start
Last active December 11, 2015 18:38 — forked from michel-slm/sync-acpi-intel.sh
The brightness keys on my acer v5 doesn't work, and adding acpi_backlight=vendor to the kernel command line doesn't work too then this file is probably for you. Remove the "acpi_backlight=vendor" and run this file at start of your system. Using gentoo I put this file in /etc/local.d/, in ubuntu look for /etc/rc.local You need to install inotify
#!/bin/bash
# Copyright (c) 2011, Michel Alexandre Salim <[email protected]>
# Permission is hereby granted, without written agreement and without
# license or royalty fees, to use, copy, modify, and distribute this
# software and its documentation for any purpose, provided that the
# above copyright notice and the following two paragraphs appear in
# all copies of this software.
#
# IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
# DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
@dkuku
dkuku / .gitconfig
Created May 2, 2018 14:35 — forked from tiagojdf/.gitconfig
My gitconfig
[user]
name = Firstname Lastname
email = [email protected]
[alias]
co = checkout
cot = "!f() { git branch | grep $1 | xargs -I {} git co {}; }; f"
b = branch
pu = push -u origin HEAD
ci = commit
st = status
@dkuku
dkuku / .i3blocks.conf
Created March 13, 2019 00:44
i3blocks - toggle services like docker or redis
[docker]
command=$HOME/systemctl
interval=once
markup=pango
[redis]
command=$HOME/systemctl
interval=once
markup=pango
@dkuku
dkuku / init.vim
Last active March 17, 2019 09:48
vim quick switch colorscheme
"install the colorschemes you want
call plug#begin('~/.vim/plugged')
Plug 'ErichDonGubler/vim-sublime-monokai' "colorscheme
Plug 'NLKNguyen/papercolor-theme'
call plug#end()
" set all the colorscheme options
let g:sublimemonokai_term_italic = 1
" set the default colorscheme
def alpha(color, background="#FFFFFF"):
def split_rgba(color):
#return tuple of integers
#strip hash from the beginning if exist
if color[0] == "#":
color = color[1:]
if len(color) in [3,4]:
R = color[0] * 2
G = color[1] * 2
B = color[2] * 2
import React from 'react'
class App extends React.Component {
constructor (props) {
super(props)
this.state = { formData: [] }
}
componentDidMount () {
// pobieramy dane
const formData = [
@dkuku
dkuku / index.html
Created August 6, 2019 15:17
simple server status monitoring page
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
@dkuku
dkuku / mapping_rules.py
Last active September 12, 2019 18:40
simple sql query generator
string_rules_p = {
"asd": ['asd', 'zxc'],
"zxc": ['asd', 'zxc'],
"qwe": ['asd', 'zxc', 'qwe'],
}
ranged_rules_p = {
"rty" : {"inc": 1, "dec": 5},
"fgh" : {"inc": 2, "dec": 3},
"vbn" : {"inc": 3, "dec": 10},

Keybase proof

I hereby claim:

  • I am dkuku on github.
  • I am dkuku (https://keybase.io/dkuku) on keybase.
  • I have a public key ASBCmZbjk-rXJvz9_DvNCvmSoJ5Ezji1iQHgNIh4WS5ATQo

To claim this, I am signing this object: