Skip to content

Instantly share code, notes, and snippets.

View teddykishi's full-sized avatar
💭
I may be slow to respond.

Teddy Kishi teddykishi

💭
I may be slow to respond.
View GitHub Profile
@teddykishi
teddykishi / github_desktop_ubuntu.sh
Created February 23, 2022 08:42 — forked from berkorbay/github_desktop_ubuntu.md
To install Github Desktop for Ubuntu
## Follow this link for further updates to Github Desktop for Ubuntu https://github.com/shiftkey/desktop/releases/latest
# UPDATE (2021-10-18): Thanks to Amin Yahyaabadi's message, the updated code is as follows
sudo wget https://github.com/shiftkey/desktop/releases/download/release-2.9.3-linux3/GitHubDesktop-linux-2.9.3-linux3.deb
### Uncomment below line if you have not installed gdebi-core before
# sudo apt-get install gdebi-core
sudo gdebi GitHubDesktop-linux-2.9.3-linux3.deb
# UPDATE (2021-03-05): Thanks to PaoloRanzi81's comment, the updated code is as follows https://gist.github.com/PaoloRanzi81
@teddykishi
teddykishi / .gitignore
Created December 12, 2021 23:25 — forked from iffy/.gitignore
Example using electron-updater with `generic` provider.
node_modules
dist/
yarn.lock
wwwroot
@teddykishi
teddykishi / node_nginx_ssl.md
Created October 28, 2021 21:57 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@teddykishi
teddykishi / iterm2-solarized.md
Created October 24, 2021 13:23 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@teddykishi
teddykishi / App.md
Created September 6, 2021 21:11 — forked from kcak11/App.md
Country Codes

Country Codes

List of all Country Codes (ISO & Dialing) sorted in alphabetical order.

@teddykishi
teddykishi / 1-proposal.md
Created June 24, 2021 15:39 — forked from JedWatson/1-proposal.md
Proposal: adding reverse-relationship population to Mongoose (as implemented in KeystoneJS)

I've developed a useful feature in KeystoneJS that lets you populate a relationship from either side, while only storing the data on one side, and am looking for feedback on whether it is something that could / should be brought back into mongoose itself. (It might be possible to add as a separate package but I suspect there'd be too much rewriting of mongoose internals for that to be a good idea).

I've added this as an issue in mongoose for consideration: #1888 but am leaving this gist in place because the examples are easier to read.

I've used Posts and Categories as a basic, contrived example to demonstrate what I'm talking about here; in reality you'd rarely load all the posts for a category but there are other real world cases where it's less unreasonable you'd want to do this, and Posts + Categories is an easy way to demo it.

The problem

The built-in population feature is really useful; not just for

@teddykishi
teddykishi / AvailablePorts.cs
Created January 21, 2021 21:39 — forked from jrusbatch/AvailablePorts.cs
Find an Available Port with C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.NetworkInformation;
using System.Net;
namespace AvailablePort
{
class Program
@teddykishi
teddykishi / cart-example.js
Created January 19, 2021 21:43 — forked from holmberd/cart-example.js
Cart pub-sub example
/** Quick and dirty Cart pub/sub example */
class CartStore {
add(item) {}
remove(index) {}
update(index, item) {}
get(index) {}
getAll() {}
}
@teddykishi
teddykishi / sshfs.md
Created January 19, 2021 21:42 — forked from holmberd/sshfs.md
Mount remote directory with SSH

Mount remote directory with SSH

  1. Install sshfs
  • $ sudo apt-get install sshfs
  1. Create local mount point
  • $ mkdir /home/test/sshfs-path
  1. Mount remote folder /remote/path to /home/test/sshfs-path/
  • $ sshfs user@remote-host:/remote/path /home/test/sshfs-path/
@teddykishi
teddykishi / Props
Created April 18, 2019 20:25 — forked from mynameispj/Props
Estimated reading time in PHP, by Brian Cray
Total props to Brian Cray: http://briancray.com/posts/estimated-reading-time-web-design/