Skip to content

Instantly share code, notes, and snippets.

View manuelbieh's full-sized avatar
⚛️
Available for hire! Berlin. React.

Manuel Bieh manuelbieh

⚛️
Available for hire! Berlin. React.
View GitHub Profile
@manuelbieh
manuelbieh / win32-node-installer
Created November 30, 2012 21:47
Install node.js on Windows silently
1. Download the recent version from nodejs.org
2. Run `msiexec /qn /l* node-log.txt /i node-vX.X.XX-x64.msi`
@manuelbieh
manuelbieh / sequelize-schema-file-generator.js
Last active January 16, 2024 19:25
Automatically generates migration files from your sequelize models
import * as models from "models";
import Sequelize from "sequelize";
import fs from "fs";
delete models.default;
const sequelize = new Sequelize(
'',
'',
'', {
@manuelbieh
manuelbieh / node-setup.bat
Last active March 20, 2023 08:53
Install node.js + some packages on Windows via Batchfile
@echo off
NET SESSION >nul 2>&1
IF %ERRORLEVEL% NEQ 0 (
echo This setup needs admin permissions. Please run this file as admin.
pause
exit
)
set NODE_VER=null
@manuelbieh
manuelbieh / README.md
Last active August 26, 2022 14:51
Deno File Download

Use Deno to download files from the internet.

Usage

deno run --allow-net --allow-write download.ts [url] [filename]

Example

import React, { useCallback, useRef } from 'react';
import {
Button,
SafeAreaView,
ScrollView,
StatusBar,
View,
} from 'react-native';
import CameraRoll from '@react-native-community/cameraroll';
@manuelbieh
manuelbieh / sequelize-migration-file-generator.js
Created January 14, 2016 16:42
Creates migration files for existing sequelize models
import * as models from "models";
import fs from "fs";
for(let model in models) {
let attributes = models[model].attributes;
for(let column in attributes) {
delete attributes[column].Model;
delete attributes[column].fieldName;

Keybase proof

I hereby claim:

  • I am manuelbieh on github.
  • I am manuelbieh (https://keybase.io/manuelbieh) on keybase.
  • I have a public key ASCOauR6B5_RIn6S1TP_uVc6eOM3DbJ-1aFXWa9f6z69qAo

To claim this, I am signing this object:

const removeEmoji = (str) => str.replace(
/([\uE000-\uF8FF]|\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDDFF])|\ud83c[\udde6-\uddff]\ud83c[\udde6-\uddff]|\xF0\x9F\xA6\x84/g,
''
)
.replace(/\xF0|\x9F|\x98|\x8D|\xF0|\x9F/g, '');
dirUp1() { cd ../"$1"; }
dirUp2() { cd ../../"$1"; }
dirUp3() { cd ../../../"$1"; }
dirUp4() { cd ../../../../"$1"; }
dirUp5() { cd ../../../../../"$1"; }
dirUp6() { cd ../../../../../../"$1"; }
alias ..=dirUp1
alias ...=dirUp2
alias ....=dirUp3
import axios from 'axios';
import applyConverters from 'axios-case-converter';
import { objectKeysToCamelCase } from 'utils';
export const redirectToLogin = () => {
window.location.href = process.env.AUTH_URL;
};
export const getAccessToken = () =>
(JSON.parse(window.localStorage.getItem('auth')) || {}).accessToken;