Skip to content

Instantly share code, notes, and snippets.

@ohmyhusky
ohmyhusky / import_notes_app_to_evernote.applescript
Created January 7, 2018 11:12 — forked from sowenjub/import_notes_app_to_evernote.applescript
Updated to import the modification date as well since that's how notes are sorted in Note.app
tell application "Notes"
set theNotes to every note of the folder "Notes"
repeat with thisNote in theNotes
set myTitle to the name of thisNote
set myText to the body of thisNote
set myCreateDate to the creation date of thisNote
set myUpdateDate to the modification date of thisNote
tell application "Evernote"
set theTransferredNote to create note with html myText ¬
title myTitle ¬
@ohmyhusky
ohmyhusky / README-setup-tunnel-as-systemd-service.md
Created November 24, 2018 00:59 — forked from drmalex07/README-setup-tunnel-as-systemd-service.md
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/[email protected]. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@ohmyhusky
ohmyhusky / formikApollo.js
Created November 24, 2018 23:58 — forked from mwickett/formikApollo.js
Formik + Apollo
import React from 'react'
import { withRouter, Link } from 'react-router-dom'
import { graphql, compose } from 'react-apollo'
import { Formik } from 'formik'
import Yup from 'yup'
import FormWideError from '../elements/form/FormWideError'
import TextInput from '../elements/form/TextInput'
import Button from '../elements/form/Button'
import { H2 } from '../elements/text/Headings'
@ohmyhusky
ohmyhusky / pgtest.js
Last active March 4, 2025 06:17
for toolbox to fetch
const { Client } = require("pg");
async function createPostgresResources() {
const adminConfig = {
user: "",
host: "",
database: "postgres", // Initially connect to 'postgres'
password: "",
port: 5432,
};