Skip to content

Instantly share code, notes, and snippets.

View kaiiserni's full-sized avatar

Kai De Sutter kaiiserni

View GitHub Profile
@manzt
manzt / my-ts-monorepo.md
Last active June 7, 2024 06:56
A minimal setup for TypeScript monorepo libraries

My Minimal TypeScript Monorepo Setup for ESM Libraries

After a deep dive looking up best practices for TypeScript monorepos recently, I couldn't find anything that suited my needs:

  1. Publish individual (typed) packages to NPM with minimal config.
  2. Supports fast unit testing that spans the entire project (e.g., via Vitest)
  3. Ability to have an interactive playground to experiment with the API in a real-time (e.g., via Vite)

Most solutions point to TypeScript project references,

@fernandoaleman
fernandoaleman / mysql2-m1.md
Last active July 4, 2024 06:22
How to install mysql2 gem on m1 Mac

Problem

Installing mysql2 gem errors on Apple silicon M1, M2 or M3 Mac running macOS Sonoma.

Solution

Make sure mysql-client, openssl and zstd are installed on Mac via Homebrew.

Replace mysql-client with whichever mysql package you are using

@mattbell87
mattbell87 / remote-wsl.md
Last active July 2, 2024 02:45
VSCode Remote: Connect to WSL2 from another machine

VSCode Remote: Connect to WSL2 from another machine

Do you want to do remote development on your WSL2 container in Visual Studio Code? Read this.

Proxy jump method

  1. On the host set up OpenSSH for Windows
  2. Run wsl --update to make sure you are running the latest WSL
  3. Open WSL and install another SSH server inside WSL with sudo apt-get install openssh-server
  4. Now run sudo systemctl enable --now ssh to automatically start ssh when WSL starts.
@ih2502mk
ih2502mk / list.md
Last active July 17, 2024 17:24
Quantopian Lectures Saved
// npm install --save scrollreveal or install like you're used to doing it.
// It doesn't work well if there are multiple instances of ScrollReveal,
// so we have to create a module returning an instance:
// file ScrollReveal.js:
import ScrollReveal from 'scrollreveal'
export default ScrollReveal()
// Then in a component:
import React from 'react'
import sr from './ScrollReveal'
@samueleastdev
samueleastdev / shell.sh
Last active May 15, 2018 09:47
Fixing Appc [ERROR] : An error occurred during build after 21s 27ms [ERROR] : pod install returned a non-zero exit code
sudo gem uninstall cocoapods
sudo gem install cocoapods
sudo rm -fr ~/.cocoapods/repos/master
pod setup
pod install
pod update
@jarretmoses
jarretmoses / React Native Clear Cache
Last active July 17, 2024 15:14
Clearing the Cache of your React Native Project
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.63 - watchman watch-del-all && rm -rf node_modules && npm install && rm -rf /tmp/metro-* && npm run start --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache
@grantges
grantges / sphero.js
Created June 23, 2016 22:50
An Appcelerator Hyperloop module (Android) for working with the Sphere robot
var ConvenienceRobot = require('com.orbotix.ConvenienceRobot');
var DualStackDiscoveryAgent = require('com.orbotix.DualStackDiscoveryAgent');
var Robot = require('com.orbotix.common.Robot');
var DiscoveryException = require('com.orbotix.common.DiscoveryException');
var RobotChangedStateListener = require('com.orbotix.common.RobotChangedStateListener');
var RobotLE = require('com.orbotix.le.RobotLE');
var Context = require('android.content.Context');
var DeviceSensorAsyncMessage = require('com.orbotix.async.DeviceSensorAsyncMessage');
var ConfigureLocatorCommand = require('com.orbotix.command.ConfigureLocatorCommand');
var ResponseListener = require('com.orbotix.common.ResponseListener');
@albertbori
albertbori / Installation.md
Last active July 15, 2024 15:33
Automatically disable Wifi when an Ethernet connection (cable) is plugged in on a Mac

Overview

This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.

Most the credit for these changes go to Dave Holland.

Requirements

  • Mac OSX 10+
  • Administrator privileges
@jasonkneen
jasonkneen / index.xml
Last active July 11, 2020 14:07
Flipboard style tabgroup indicator for iOS. Drop tabIndicator.js into your Alloy lib folder, then add the module tag to your tabgroup and parameters to override the defaults. As you click on each tab, the indicator will slide across. VIDEO https://www.dropbox.com/s/cbw5e1ruksud9uo/tabindicator.mp4?dl=0
<!-- note the ONLY change to this is the additional module="tabIndicator"
attribute + properties to override indicator defaults //-->
<Alloy>
<TabGroup module="tabIndicator" tabsBackgroundColor="#000" tabIndicatorHeight="1" tabIndicatorColor="white" tabIndicatorWidth="75%">
<Tab title="Tab 1" icon="/images/icons/519-tools-1.png" activeIcon="/images/icons/519-tools-1_active.png" color="#555" activeColor="#fff">
<Window title="Tab 1" barColor="black" navTextColor = "#fff">
<Label onClick="openWin1">Tab 1</Label>
</Window>
</Tab>
<Tab title="Tab 2" icon="/images/icons/516-archive-box.png" activeIcon="/images/icons/516-archive-box_active.png" color="#555" activeColor="#fff">