Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
#!/bin/bash | |
echo "Generating an SSL private key to sign your certificate..." | |
openssl genrsa -des3 -out myssl.key 1024 | |
echo "Generating a Certificate Signing Request..." | |
openssl req -new -key myssl.key -out myssl.csr | |
echo "Removing passphrase from key (for nginx)..." | |
cp myssl.key myssl.key.org | |
openssl rsa -in myssl.key.org -out myssl.key |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
var CrossfadeSample = {playing:false}; | |
CrossfadeSample.play = function() { | |
// Create two sources. | |
this.ctl1 = createSource(BUFFERS.drums); | |
this.ctl2 = createSource(BUFFERS.organ); | |
// Mute the second source. | |
this.ctl1.gainNode.gain.value = 0; | |
// Start playback in a loop | |
if (!this.ctl1.source.start) { |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)Here are a few example use cases, these use cases combine filter with other parameters to make useful API queries. The syntax for any of this may change between now, implementation, and release - they're meant as illustrative examples :)
api.posts.browse({filter: "tags:[photo, video] + id:-5", limit="3"});
GET /api/posts?filter=tags%3A%5Bphoto%2Cvideo%5D%2Bid%3A-5&limit=3
This is an example of using Tether Drop with React Portal (and Redux for managing the state). I was asked if using React Portal is redundant, as both libraries pull the content into the <body>
. Using only Drop would cause an invariant violation in React becuase of the DOM mutation, so I'm using React Portal to first bring it outside without React complaining (I don't know how React Portal does it, I haven't checked out the source, but it works). Once it's out of React's supervision, I can apply Drop to it.
Dropdown.jsx
is the actual dropdown componentApp.jsx
is just an demo that uses itThis is my lazy way out of this limitation using an existing library that has much more features than you need, but chances are that you're going to need a library like React Portal anyway for stuff like modals.
import React from 'react' | |
import { func, node, number, object, shape, string } from 'prop-types' | |
import { withRouter } from 'react-router' | |
import debounceFn from 'lodash/debounce' | |
class ScrollManager extends React.Component { | |
static propTypes = { | |
children: node.isRequired, | |
history: shape({ | |
action: string.isRequired, |