Skip to content

Instantly share code, notes, and snippets.

View naku-i386's full-sized avatar
✂️
Casually running with scissors

Piotr D naku-i386

✂️
Casually running with scissors
View GitHub Profile
@naku-i386
naku-i386 / .rubocop.yml
Created August 5, 2019 17:57
Rubocop config
require: rubocop-rspec
AllCops:
DisplayCopNames: true
TargetRubyVersion: 2.6.1
Exclude:
- "db/*"
- "vendor/**/*"
Documentation:
@naku-i386
naku-i386 / gist:439d230b629820140b7512a73ff3124c
Created May 1, 2019 12:58
efibootmgr - adding loader entries
# Example Systemd-boot entry
efibootmgr --create --disk /dev/sda --part 1 --loader /EFI/systemd/systemd-bootx64.efi --label "Systemd Boot Manager" --verbose
# Example Windows Boot Loader entry
efibootmgr --create --disk /dev/sda --part 1 --loader /EFI/Microsoft/Boot/bootmgfw.efi --label "Windows Boot Manager" --verbose
@naku-i386
naku-i386 / sidekiq.rb
Last active January 15, 2019 13:16
RubySidekiq - Testing and Clearing
# Control Sidekiq mode in specs
before do
Sidekiq::Testing.disable! # will now actually persist to redis
end
after do
Sidekiq::Testing.fake! # will push to fake jobs array
end
# Retrieve fake jobs
@naku-i386
naku-i386 / .eslintrc.js
Last active July 10, 2018 12:36
ESLint with React - minimal config
// Packages installed:
// "eslint": "^4.19.1",
// "eslint-config-google": "^0.9.1",
// "eslint-plugin-react": "^7.8.2",
module.exports = {
"extends": [
"google", // Use google styleguide
"plugin:react/recommended" // Fix "Unused import" when using JSX and extend eslint with more options
],
@naku-i386
naku-i386 / settings.json
Last active September 3, 2018 10:34
VSCode preferences - Format on save, tabs, trim whitespace, final newline
"editor.detectIndentation": false,
"editor.insertSpaces": false,
"editor.tabSize": 2,
"editor.trimAutoWhitespace": true,
"editor.formatOnSave": true,
"files.autoSave": "off",
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"editor.acceptSuggestionOnEnter": "off",
"editor.acceptSuggestionOnCommitCharacter": false,
@naku-i386
naku-i386 / Blocker.js
Last active May 30, 2018 11:03
React Native overlay with fadein and fadeout animations. Can be used as a blocker when content is being loaded
import React from 'react';
import { ActivityIndicator, Animated, View } from 'react-native';
/**
* <Blocker active={this.state.loading}>
* Content goes here...
* </Blocker>
*
*/
export class Blocker extends React.Component {
@naku-i386
naku-i386 / .bashrc
Last active May 31, 2018 18:34
Show git branch name in terminal prompt
# Default PS1
# PS1='[\u@\h \W]\$ '
# PS1 that includes git branch name
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
PS1="\u@\h \[\033[32m\]\W\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "