Skip to content

Instantly share code, notes, and snippets.

View revolunet's full-sized avatar
🐫
Killing bugz

Julien Bouquillon revolunet

🐫
Killing bugz
View GitHub Profile
@tiffany352
tiffany352 / index.html
Last active May 1, 2024 11:36
Twitter archive browser
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Twitter Archive Browser</title>
<script src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
<style>
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: elasticsearch
labels:
service: elasticsearch
spec:
serviceName: es
# NOTE: This is number of nodes that we want to run
# you may update this
@thomas15v
thomas15v / docker.compose.yml
Last active June 22, 2022 09:41
traefik.io nginx example
version: '2'
services:
nginx:
image: nginx:alpine
restart: always
labels:
- "traefik.enable=true"
- 'traefik.frontend.rule=Host:www.website.com'
- "traefik.port=80"
volumes:
@brunocascio
brunocascio / reset-knex-seq.js
Last active July 4, 2020 13:06
Reset all tables sequence values in postgres with knex
return await knex.transaction(async t => {
try {
// Retrieve table names (excluding migrations_lock)
const tables = (await knex
.raw(`
SELECT table_name FROM information_schema.tables
WHERE table_schema = 'public'
`)
.transacting(t)
)
@migliori
migliori / .htaccess
Last active February 13, 2024 06:32
.htaccess #server #apache
# Apache configuration file
# https://gist.github.com/migliori/1ae6137b8b7009d067fa383e8ce92e3d
RewriteEngine on
RewriteBase /
Options +FollowSymLinks
# Rewrite to https + www
RewriteCond %{REMOTE_ADDR} !127.0.0.1
RewriteCond %{HTTP_HOST} !^www\.
import React from 'react'
import revalidation from 'revalidation'
import gql from 'graphql-tag.macro'
import { filter } from 'graphql-anywhere'
import { curry } from 'ramda'
import { compose, withProps, withHandlers } from 'recompose'
import { graphql } from 'react-apollo'
import { Button } from '../common/styled'
import { getValue } from '../form/utils'
import { isRequired } from '../../utils/validation'
@Hopobcn
Hopobcn / README.md
Last active September 16, 2020 21:47
gitlab-runner configuration file with docker runner for using NVIDIA GPUs (nvidia-docker)

Use Gitlab-CI with GPU support

Since gitlab-runner cannot be forced to use nvidia-docker wrapper, follow this steps:

  1. Install all required software: docker, nvidia-docker, gitlab-ci-multi-runner
  2. Execute: curl -s http://localhost:3476/docker/cli
  3. Use that data to fill devices/volumes/volume_driver fields in /etc/gitlab-runner/config.toml
@anvk
anvk / psql_useful_stat_queries.sql
Last active May 22, 2024 09:29
List of some useful Stat Queries for PSQL
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB.
------------
-- Basics --
------------
-- Get indexes of tables
@laurenfazah
laurenfazah / authentication_with_express_postgres.md
Last active November 8, 2022 01:51
Authentication with an Express API and Postgres

Authentication with an Express API and Postgres

Setting Up

Let's make sure our Express app has the required base modules:

# within root of API
npm install --save express pg knex bcrypt
npm install --save-dev nodemon
@wshayes
wshayes / Dockerfile-es
Last active April 21, 2022 02:59
Elasticsearch and Kibana using docker-compose (v3)
FROM docker.elastic.co/elasticsearch/elasticsearch:5.5.1
RUN \
mv /usr/share/elasticsearch/plugins/x-pack /usr/share/elasticsearch/plugins/.removing-x-pack && \
mv /usr/share/elasticsearch/plugins/.removing-x-pack /usr/share/elasticsearch/plugins/x-pack && \
/usr/share/elasticsearch/bin/elasticsearch-plugin remove x-pack