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
<!DOCTYPE html>
<meta charset=utf-8>
<meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name=apple-mobile-web-app-capable content=yes>
<meta name=apple-mobile-web-app-status-bar-style content=black>
<title>Test fullscreen</title>
<style>
html, body {
margin: 0;
padding: 0;
@teddykishi
teddykishi / ex1-prototype-style.js
Created March 8, 2016 23:42 — forked from getify/ex1-prototype-style.js
OLOO (objects linked to other objects) pattern explored (with comparison to the prototype style of the same code)
function Foo(who) {
this.me = who;
}
Foo.prototype.identify = function() {
return "I am " + this.me;
};
function Bar(who) {
Foo.call(this,"Bar:" + who);
@teddykishi
teddykishi / meta-tags.md
Created April 17, 2019 22:27 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@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/
@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 / 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 / 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 / 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 / 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 / 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