Skip to content

Instantly share code, notes, and snippets.

services:
- docker:dind
stages:
- dependencies
- test
- build
- publish
install_dependencies:
[Unit]
Description=AutoSSH service to remotely access signald's unix socket for weechat's signal.py (/smsg +145789323231)
After=network-online.target
# Use this instead if autossh will interact with the local SSH server
# After=network-online.target sshd.service
[Service]
Environment="AUTOSSH_GATETIME=30"
Environment="AUTOSSH_POLL=30"
Environment="AUTOSSH_FIRST_POLL=30"
@tolu
tolu / wsl-puppeteer.js
Last active January 28, 2022 14:20
Puppeteer on WSL
// resource: http://ktkr3d.github.io/2020/01/27/Puppeteer-on-WSL/
// install puppeteer
// > npm i -g puppeteer
// use chrome from windows: add this to ~/.profile
// PATH=/mnt/c/Program\ Files\ \(x86\)/Google/Chrome/Application:$PATH
const puppeteer = require('puppeteer');
@natowi
natowi / audio2midi.md
Last active July 19, 2024 03:32
List of open source audio to midi packages
@dalezak
dalezak / README.md
Last active September 11, 2023 09:51
Ionic Capacitor Resources Generator
  1. Run npm install cordova-res --save-dev
  2. Create 1024x1024px icon at resources/icon.png
  3. Create 2732x2732px splash at resources/splash.png
  4. Add "resources": "cordova-res ios && cordova-res android && node scripts/resources.js" to scripts in package.json
  5. Copy resources.js file to scripts/resources.js
  6. Run sudo chmod -R 777 scripts/resources.js
  7. Run npm run resources
@WangHansen
WangHansen / userschema.ts
Last active October 14, 2022 18:40
Convert Mongoose js to ts
import { Document, Model, model, Types, Schema, Query } from "mongoose"
import { Company } from "./Company"
// Schema
const UserSchema = Schema<UserDocument, UserModel>({
firstName: {
type: String,
required: true
},
lastName: String,
@thomasdarimont
thomasdarimont / docker-compose.yml
Created January 25, 2019 17:52
Docker OpenLDAP + phpldapadmin example
version: '2'
services:
openldap:
image: osixia/openldap:1.2.3
container_name: openldap
environment:
LDAP_LOG_LEVEL: "256"
LDAP_ORGANISATION: "Example Inc."
LDAP_DOMAIN: "example.org"
LDAP_BASE_DN: ""
@robertrossmann
robertrossmann / readme.md
Last active November 25, 2021 15:04
TypeScript - Intellisense support for ES modules (_.mjs_ files)

TypeScript - Intellisense support for ES modules

This patch, based on commit https://github.com/Microsoft/TypeScript/commit/beebda3574be7f9a51f33ac24ab117f696ca9055, will add Intellisense support to projects which utilise the .mjs file extension for JavaScript modules.

⚠️ Warning

  • I have only used this from within tsserver. I did not attempt to use the tsc tool to do any kind of compilation of .mjs files.
  • This patch causes tsserver to treat all .mjs files as regular JavaScript files. This might be semantically wrong since these files have different semantics.

What works

@avishayp
avishayp / Dockerfile
Created September 25, 2018 19:02
Add non-root user for alpine linux
# non root user example for alpine
#
# usage:
# $ docker build --build-arg "USER=someuser" --tag test .
# $ docker run --rm test
FROM alpine
ARG USER=default
ENV HOME /home/$USER
@noelbundick
noelbundick / LICENSE
Last active May 24, 2024 09:10
Exclude WSL installations from Windows Defender realtime protection
MIT License
Copyright (c) 2018 Noel Bundick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: