Skip to content

Instantly share code, notes, and snippets.

View tbekaert's full-sized avatar
👀

Thomas Bekaert tbekaert

👀
  • PerfectDraft, ABInBev
  • Lille, France
View GitHub Profile

Edit vhost

sudo nano /etc/apache2/extra/httpd-vhosts.conf

  <VirtualHost *:80>
    ServerName localwebsite.local
    DocumentRoot "/Users/username/workspace/localwebsite"
    ErrorLog "/private/var/log/apache2/localwebsite-error_log"
    CustomLog "/private/var/log/apache2/localwebsite-access_log" common
@tbekaert
tbekaert / git-subtree.md
Last active March 14, 2018 14:54
Adding frontend_starter as subtree

Adding frontend_starter in any project

Create your new branch in frontend_starter and push it on github

Inside frontend_starter folder, type those instructions :

$ git checkout -b <branch-name>
$ git push origin <branch-name>
@tbekaert
tbekaert / readme.md
Created January 3, 2018 14:45
Create a release tag, merge into master and publish to npm and Github

Semver

Semantic versioning is a very nice way to keep track of the evolution of your module. Basically, your module will have 3 numbers, for example 1.2.3, where:

  • The number 1 is for major changes and you have to increase it when you make breaking changes to your module. For example, if the add method accept an object as argument and you change it to only accept arrays for now on, you have to increase the major number since you created a breaking change.
  • The number 2 is for minor changes and you have to increase it when you add new functionalities to your public API without making any breaking changes. For example, add a new find method.
  • The number 3 is for patch changes and you have to increase it when you fix something, without changing the public API. For example, you manage to iterate over the feed list in a much more efficient way.

For more informations about semantic version: http://semver.org/

Package version in npm and Release tag in Github

@tbekaert
tbekaert / array.js
Last active March 1, 2018 07:33
Collection of js utils
/**
* Concat arrays
*
* @params {array} arrs - List of arrays
* @example
* import { concatArrays } from "path/to/array.js"
*
* let arr1 = [1, 2, 3];
* let arr2 = [4, 5, 6];
*
@tbekaert
tbekaert / input.scss
Created January 7, 2021 09:31
Generated by SassMeister.com.
@import url('https://fonts.googleapis.com/css2?family=Roboto&family=Roboto+Condensed:wght@400;700&display=swap');
#onetrust-consent-sdk{
#onetrust-banner-sdk.otCenterRounded{
top: 0;
position: fixed;
right: 0;
background-color: transparent;
width: 100%;
max-width: 100vw;
@tbekaert
tbekaert / Linear inbox widget.js
Last active April 10, 2024 22:03
[Scriptable] Linear inbox widget
const LINEAR_API_KEY = "YOUR_API_KEY_HERE";
const WIDGET_SIZE = "medium"; // "small" | "medium" | "large"
let widget = await createWidget();
if (config.runsInWidget) {
Script.setWidget(widget);
} else {
switch (WIDGET_SIZE) {
case "large": {
@tbekaert
tbekaert / boost.js
Last active December 12, 2022 12:33
Arc Boost to add a `Mark as review` utils on GitHub pull request
let previousPathname = '';
// This Observer is needed as GitHub is a SPA
let observer = new MutationObserver(function(mutations) {
if (location.pathname !== previousPathname) {
previousPathname = location.pathname;
if (/\/pull\/[\d]+\/files/.test(location.pathname)) {
// The timeout is here to wait for the page to load
// before injecting the button
setTimeout(() => {
injectMarkAsViewed()