Skip to content

Instantly share code, notes, and snippets.

View haikyuu's full-sized avatar

Abdellah haikyuu

View GitHub Profile
@haikyuu
haikyuu / Usage.js
Last active December 7, 2016 16:13
styled-components debugger. Credits to @thekitze
const Box = styled.div`
width: 70%;
height: 24vw;
background: white;
border-radius: 1.2vh;
position: relative;
${debug('BOX')}
`
A cluster is a group of databases runing on the same server;
- `COPY tablename FROM '/home/user/weather.txt'` *inserts* rows from the given file to `tablename`; [Copy](http://devdocs.io/postgresql~9.6/sql-copy)
@haikyuu
haikyuu / manifest.appcache
Last active January 25, 2017 12:23
Simple manifest file
CACHE MANIFEST
index.html
stylesheet.css
images/logo.png
scripts/main.js
http://cdn.example.com/scripts/main.js
@haikyuu
haikyuu / manifest.appcache
Created January 25, 2017 12:29
Not so simple appcache manifest
CACHE MANIFEST
# 2010-06-18:v3
# Explicitly cached entries
index.html
css/style.css
# offline.html will be displayed if the user is offline
FALLBACK:
/ /offline.html
@haikyuu
haikyuu / keybase.md
Created September 20, 2017 11:28
proof

Keybase proof

I hereby claim:

  • I am haikyuu on github.
  • I am abdellah (https://keybase.io/abdellah) on keybase.
  • I have a public key ASDSV5ep5eikmJUbbdnkSR0Ig-xV6VAJ4xkqvh432PTJPQo

To claim this, I am signing this object:

var airbrake = new airbrakeJs.Client({
projectId: 157180,
projectKey: 'b4831e7abc62eceb3f0e49a822e0daa3'
});
airbrake.addFilter(function (notice) {
notice.context.environment = 'production';
return notice;
});
var HelloSign =
@haikyuu
haikyuu / Dockerfile
Created October 3, 2017 09:16
nginx Dockerfile
FROM ubuntu:16.04
MAINTAINER Abdellah Alaoui
RUN apt-get update && apt-get install -y nginx \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& echo "daemon off;" >> /etc/nginx/nginx.conf
#override default nginx config
@haikyuu
haikyuu / Dockerfile
Last active October 3, 2017 09:28
node Dockerfile
FROM ubuntu:16.04
MAINTAINER Abdellah Alaoui
RUN apt-get update \
&& apt-get install -y locales \
&& locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
@haikyuu
haikyuu / flow-redux.guideline.md
Created November 13, 2017 15:19 — forked from sibelius/flow-redux.guideline.md
How to easily type Redux Props with Flow

How to easily type Redux Props with Flow

Add ExtractReturn helper

// https://hackernoon.com/redux-flow-type-getting-the-maximum-benefit-from-the-fewest-key-strokes-5c006c54ec87
// https://github.com/facebook/flow/issues/4002
// eslint-disable-next-line no-unused-vars
type _ExtractReturn<B, F: (...args: any[]) => B> = B;
export type ExtractReturn = _ExtractReturn&lt;*, F&gt;;

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets