Skip to content

Instantly share code, notes, and snippets.

View sinxwal's full-sized avatar
🕸️
(•___•)

Sergei Tskhovrebov sinxwal

🕸️
(•___•)
  • Frankfurt, Germany
View GitHub Profile
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active June 10, 2024 15:37
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@Restuta
Restuta / the-bind-problem.jsx
Last active March 16, 2024 00:22
React, removeEventListener and bind(this) gotcha
/* Sometimes it's pretty easy to run ito troubles with React ES6 components.
Consider the following code: */
class EventStub extends Component {
componentDidMount() {
window.addEventListener('resize', this.onResize.bind(this)); //notice .bind
}
componentWillUnmount() {
window.removeEventListener('resize', this.onResize.bind(this));
@orther
orther / index.js
Created January 27, 2017 17:34
A few simple examples of sorting with Ramda's sortBy function.
import R from 'ramda';
const items = [
{id: 1, name: 'Al', country: 'AA'},
{id: 2, name: 'Connie', country: 'BB'},
{id: 3, name: 'Doug', country: 'CC'},
{id: 4, name: 'Zen', country: 'BB'},
{id: 5, name: 'DatGGboi', country: 'AA'},
{id: 6, name: 'Connie', country: 'AA'},
];
@dabit3
dabit3 / configureStore.js
Created February 18, 2017 22:02
Medium - redux4ways - Redux Saga configureStore.js
import { createStore, applyMiddleware } from 'redux'
import app from './reducers'
import createSagaMiddleware from 'redux-saga'
import dataSaga from './saga'
const sagaMiddleware = createSagaMiddleware()
export default function configureStore() {
const store = createStore(app, applyMiddleware(sagaMiddleware))
@finist
finist / ror_ubuntu_16.04.md
Last active June 16, 2021 21:52
Ruby on Rails setup on Ubuntu 16.04
@iryston
iryston / macos_ramdisk_setup.sh
Created June 9, 2020 17:49
Create RAM Disk in MacOS and move some cache folders to RAM
#!/bin/bash
## Read and edit this file.
## Run it once as a root.
FILE="/Library/Scripts/ramdisk.sh"
if [[ $EUID -ne 0 ]]; then
echo "You must be a root user" 2>&1
exit 1