Skip to content

Instantly share code, notes, and snippets.

View masone's full-sized avatar
🚗

Christian Felder masone

🚗
View GitHub Profile
@masone
masone / onetrustFirstPartyHandler.jsx
Created July 13, 2021 15:08
First-party onetrust cookie
import { parseCookies, setCookie as setNookie } from "nookies"
const onetrustFirstPartyHandler = (req, res, next) => {
const cookies = parseCookies({ req })
const setCookie = (name) => {
const value = cookies[name]
if (value) {
setNookie({ res }, name, value, {
httpOnly: false,
@masone
masone / hiring-process.md
Created July 9, 2021 05:18
FE Hiring process

Hiring process at CAR FOR YOU

  • You send in your documents CV and cover letter through the application form. After ~10 days, we have reviewed all applications and will get back to you
  • If we think it’s a fit, we will invite you to a 30-45 minutes video call
  • If we decide to move forward, we will send you a coding challenge which is related to work you would be doing at CAR FOR YOU. You can tackle it at your own discretion. If you prefer a whiteboard interview instead, let us know
  • The team will have a look at your result and discuss it with you on a video call. We will furter check up on your technical and interpersonal skills ans discuss the conditions of employment together at this point. Feel free to address it earlier if you'd like to
  • If everything fits, you will first meet future colleagues from engineering and then representatives from marketing, design and product before we make an offer
Jul 08 13:20:09.965 __SENTRY__: { hub: [Hub] },
Jul 08 13:20:09.965 members: [ [IncomingMessage], [ServerResponse] ],
Jul 08 13:20:09.965 _maxListeners: undefined,
Jul 08 13:20:09.965 _eventsCount: 3,
Jul 08 13:20:09.965 error: [Function] },
Jul 08 13:20:09.965 newListener: [Function: updateExceptionCapture],
Jul 08 13:20:09.965 removeListener: [Function: updateExceptionCapture],
Jul 08 13:20:09.965 [Object: null prototype] {
Jul 08 13:20:09.965 _events:
Jul 08 13:20:09.965 domain: null,
@Get(":id")
detail(@Param() param) {
param // => undefined
}
@masone
masone / localconfig-status.md
Last active May 23, 2018 10:47
Status of LocalConfig

LocalConfig status

Optional: Rename API methods

In the knowledge sharing session on LocalConfig, there was a bit of confusion about some of the API methods of the gem. The audience expected LocalConfig::Store#load_namespace! to load configs from kubernetes, which it doesn't actually do. It merely loads a hash into memory. LocalConfig.load_namespaces! on the other hand actually does load configmaps. But it additionally initializes the namespaces (including app, which is not a kubernetes configmap). Also, the boundaries between namespaces that build on shared kubernetes configmaps, namespaces that are just local objects are hard to grasp. Furthermore, we might want to distinguish clearly between custom namespaces the app explicitly registers and namespaces that are pre-populated by the gem.

I came up with a proposal in https://github.com/local-ch/local_config/pull/19, which has yet to be confirmed if it's less confusing or not. Maybe it's easier to decide once people start working with it. The g

@masone
masone / rollout.md
Last active April 12, 2018 12:04
Local UI rollout
change time  impact
1% Freitag 6.4. - 12:00
3% Freitag 6.4. - 15:30
5% Dienstag 10.4. - 8:30
Flipper cookie on all controllers Dienstag 10.4. Nachmittag we now get ~7% of the pageviews (employees and public) on local-ui. The response times in analytics start to increase. servers seem idle, so I interpret the problem is throughput, not server resources
3% Dienstag Nachmittag response times look better again
New Logstash Mittwoch 11.4. - 8:50
Rails 5 Mittwoch 11.4. - 9:30 ~
Flipper switch redirect lui 11:20 if you see redirect loops, this is the one to revert
@masone
masone / webpack.md
Last active November 8, 2017 09:18
webpack.md
module.exports =
api:
host: process.env.api__host
imagesApi:
host: process.env.api__host
designsApi:
host: 'https://api.livingdocs.io'
@masone
masone / skyscanner.js
Last active January 27, 2017 11:47
skyscanner
!function (e) {
function t() {
var t = e.skyscanner = e.skyscanner || {}, r = t.widgets = t.widgets || {}, a = r.renderCache = r.renderCache || {}, s = r.requests = r.requests || {};
return {widgets: r, renderCache: a, requests: s}
}
function r(e, t, r) {
t = t || "", r = r || {}, r.v = "6678ba";
var a = Object.keys(r).filter(function (e) {
return e && null !== r[e]
@masone
masone / raspberry-pi-cheatsheet.sh
Last active September 13, 2017 19:45
Raspberry Pi cheatsheet sonos / flic
# Raspbian jessy https://www.raspberrypi.org/downloads/raspbian/
# For lite, touch ssh file https://www.raspberrypi.org/documentation/remote-access/ssh/
# Install nvm https://github.com/creationix/nvm#installation
git clone https://github.com/50ButtonsEach/fliclib-linux-hci.git
crontab -e
@reboot cd /home/pi/node-sonos-http-api && /home/pi/.nvm/versions/node/v4.7.2/bin/node server.js > /home/pi/node-sonos.log $
@reboot /home/pi/fliclib-linux-hci/flicd --wait-for-hci -d -f /home/pi/fliclib-linux-hci/flic.sqlite -l /home/pi/flicd.log