Skip to content

Instantly share code, notes, and snippets.

@JanBe
JanBe / assessment.html
Last active October 4, 2017 08:00
Coding Test
<html>
<head>
<script type='text/javascript' src='assessment.js'></script>
</head>
<body></body>
</html>
@JanBe
JanBe / stylelint.config.js
Last active July 26, 2017 14:18
Stylelint AirBnB Styleguide configuration
module.exports = {
"rules": {
"selector-max-id": 0,
"indentation": 2,
"block-opening-brace-space-before": "always",
"declaration-colon-space-after": "always",
"declaration-colon-space-before": "never",
"block-opening-brace-newline-after": "always",
"block-closing-brace-newline-before": "always",
"rule-empty-line-before": ["always", { "except": ["first-nested"], "ignore": ["after-comment"] }],
@JanBe
JanBe / .eslintrc
Last active June 30, 2017 11:24
Compeon ESLint rules
// This is not a complete .eslintrc file, only our selection of rules
"rules": {
"semi" : 0,
"key-spacing" : 0,
"jsx-quotes" : [2, "prefer-single"],
"max-len" : [2, 120, 2],
"object-curly-spacing" : [2, "always"],
"no-tabs" : 1,
"react/prop-types" : 1,
"react/display-name" : 1,
@JanBe
JanBe / .ruby-style.yml
Created June 30, 2017 11:08
COMPEON rubocop config
AllCops:
TargetRubyVersion: 2.4
Exclude:
- 'bin/**/*'
- 'db/**/*'
- 'doc/**/*'
- 'vendor/**/*'
# Although it is a good idea to documentation at a class level, developers should
# not be forced to add a documentation. Because good naming or usefull conventions

Keybase proof

I hereby claim:

  • I am janbe on github.
  • I am jabe (https://keybase.io/jabe) on keybase.
  • I have a public key ASCcowdGiqyA0L4qIpJ8WK5RN9BsJqsSy5DP9HaVEE3U1Ao

To claim this, I am signing this object:

@JanBe
JanBe / example.py
Created January 21, 2016 00:58
Adafruit LCD: Code snippet to reproduce an issue with writing subsequent messages to the LCD
#!/usr/bin/python
import Adafruit_CharLCD as LCD
lcd = LCD.Adafruit_CharLCDPlate()
lcd.message('First line\nSecond line')
lcd.message('New first line\nNew second line')
@JanBe
JanBe / example.py
Created January 21, 2016 00:54
Adafruit LCD: Code snippet to reproduce an issue with writing subsequent messages to the LCD
#!/usr/bin/python
import Adafruit_CharLCD as LCD
lcd = LCD.Adafruit_CharLCDPlate()
lcd.message('First Line\nSecond Line')
lcd.message('New first Line\nNew second Line')
@JanBe
JanBe / github.com.js
Last active October 25, 2016 16:14
Some improvements for GitHub's pull request view (using https://github.com/defunkt/dotjs)
$(function() {
addProgressBar = function() {
checked = $('.discussion-timeline input:checkbox:checked.task-list-item-checkbox').length
total = $('.discussion-timeline .task-list-item-checkbox').length
progress = (checked / total) * 100.0
bar = '<div class="discussion-sidebar-item progress">'
bar += '<h3 class="discussion-sidebar-heading">Progress</h3>'
bar += '<span class="progress-bar">'
bar += '<span class="progress" style="width: ' + progress + '%">'
bar += '&nbsp;'
@JanBe
JanBe / pre-commit.sh
Created November 6, 2013 14:42
Git pre-commit hook to prevent pry stuff from getting into the codebase
# Git pre-commit hook to check all staged files for pry references
#
# Installation
#
# ln -s /path/to/pre-commit.sh /path/to/project/.git/hooks/pre-commit
#
# Based on
#
# http://www.alexbevi.com/blog/2012/08/23/keeping-pry-breakpoints-out-of-git/
#