Skip to content

Instantly share code, notes, and snippets.

@slonoed
slonoed / eslint-local-rules.js
Created March 6, 2019 11:13
eslint rule to prevent await in expressions
/*
Should be used with "eslint-plugin-local-rules" plugin
*/
'use strict'
module.exports = {
'no-await-in-expressions': {
meta: {
type: 'problem',
@vovkasm
vovkasm / KeyboardAvoidingView.tsx
Created November 30, 2018 05:47
Sample of custom analog of KeyboardAvoidingView in "padding" mode, that actually works.
import React from 'react'
import {
EmitterSubscription,
Keyboard,
LayoutAnimation,
LayoutChangeEvent,
LayoutRectangle,
Platform,
StyleSheet,
View,
@shilder
shilder / generate.sh
Created August 13, 2018 16:53
clojure-soap-simple
# generate java sources for WSDL
# http://fias.nalog.ru/WebServices/Public/DownloadService.asmx?WSDL
wsimport -B-npa -Xnocompile -s src/java -encoding utf-8 -p ru.nalog.fias resources/DownloadService.xml
@swalkinshaw
swalkinshaw / tutorial.md
Last active November 13, 2023 08:40
Designing a GraphQL API
@jasongilman
jasongilman / atom_clojure_setup.md
Last active January 11, 2024 09:13
This describes how I setup Atom for Clojure Development.

Atom Clojure Setup

This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.

Install Atom

Download Atom

The Atom documentation is excellent. It's highly worth reading the flight manual.

@mordaha
mordaha / nginx.conf
Created November 5, 2015 14:29 — forked from thoop/nginx.conf
Official prerender.io nginx.conf for nginx
# Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
server_name example.com;
root /path/to/your/root;
index index.html;
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 1, 2024 13:31
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'