Skip to content

Instantly share code, notes, and snippets.

View bafxyz's full-sized avatar
🚴
Cycling

Andrei Bunulu bafxyz

🚴
Cycling
  • Luxembourg, Germany
  • 07:24 (UTC +02:00)
View GitHub Profile
$ awk -v ORS='\\n' '1' karnov-review.2019-01-21.private-key.pem | pbcopy
@bafxyz
bafxyz / VPN server setup
Last active April 23, 2020 22:46
Raspberry pi
- ssh pi@raspberrypi.local
1 sudo apt-get update
2 sudo apt-get install tightvncserver
3 vncserver :1
4 sudo apt-get install netatalk
5 ifconfig
7 sudo apt-get install avahi-daemon
8 sudo update-rc.d avahi-daemon defaults
9 sudo vim /etc/avahi/services/afpd.service
@bafxyz
bafxyz / patch.diff
Last active June 4, 2020 20:16
Ender 3 with BTT skr1.4 + MTC2209, BLTouch (Marlin 2.0.5.3)
diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index f02e69ee5..d006ae218 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -71,7 +71,7 @@
// @section info
// Author info of this build printed to the host during boot and M115
-#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
+#define STRING_CONFIG_H_AUTHOR "(Anrei Bunulu. SKR 1.4, MTC2209, BLTOUCH, Ender-3)" // Who made the changes.
@bafxyz
bafxyz / request.js
Created February 27, 2019 22:04 — forked from sheharyarn/request.js
Axios Request Wrapper for React (https://to.shyr.io/axios-requests)
/**
* Axios Request Wrapper
* ---------------------
*
* @author Sheharyar Naseer (@sheharyarn)
* @license MIT
*
*/
import axios from 'axios'
@bafxyz
bafxyz / sass-theming-mixin.scss
Last active July 29, 2022 12:03
Standard Sass theming solution
/*
* Implementation of themes with standart sass solution not compatible with css-modules and css-in-js
* https://medium.com/@dmitriy.borodiy/easy-color-theming-with-scss-bc38fd5734d1
*
* $themes: (
* light: (
* elementBackgroundColor: var(--element-bg),
* elementColor: var(--element-color)
* ),
* dark: (
https://css-in-js-playground.com/
https://github.com/cssinjs/theming
https://medium.com/object-partners/css-in-js-benefits-drawback-and-tooling-80286b03f9aa
1. https://medium.com/@linmic/theming-system-in-react-js-way-99604025c91a
2. https://www.webpackbin.com/bins/-KyLdRZ32txSWScdeR3D
3. https://github.com/react-toolbox/react-toolbox-themr
4. http://airbnb.io/projects/react-with-styles/
@bafxyz
bafxyz / vim-install.sh
Created March 13, 2017 10:47
Install vim locally
cd
if [ ! -d ~/.local ]; then
mkdir ~/.local
fi
if [ ! -d ~/bin ]; then
mkdir ~/bin
fi
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2
tar -jxvf vim-7.4.tar.bz2
cd vim74
# To forward sshtalk.in:8080 -> Cart.local:4567, you can do:
local="Cart.local:4567" # or "localhost:4567"
remote="*.8080" # "*" for all interfaces (default = loopback only)
ssh -R ${remote}:${local} sshtalk.in
====================================================================
/**
* This file adds logger in each function for parsed js files.
* After that you can simply console.log(window.logFunc); in browser and will see how many functions has been affected while you opened different site sections.
* This helps us collect object with used js functions, so unused functions can be simply removed from project.
*
* Setup:
* - node.js should be installed
* - run `npm i glob` in jsm-mobile\application\static\web folder
* - run `node logger-func.js` in jsm-mobile\application\static\web\frontend_backbone and check js files for changes
*/
@bafxyz
bafxyz / gist:0e8b5c2bd196c3531bdc
Last active September 16, 2015 15:33 — forked from lxyuma/gist:6424131
marionette script
// sample
var MyView = Marionette.ItemView.extend({
template: "my-template-id"
});
var myView = new MyView({ model: Dog});
myView.render();
// ItemView sample