Skip to content

Instantly share code, notes, and snippets.

View gangsthub's full-sized avatar
Creative developer

Paul Melero gangsthub

Creative developer
View GitHub Profile
@bsolomon1124
bsolomon1124 / basic.py
Created July 11, 2018 15:49
Demonstrates different LogRecord attributes (formatters)
"""Demonstrates different LogRecord attributes (formatters).
https://docs.python.org/3/library/logging.html#logrecord-attributes
"""
import logging
# Notes
# -----
# pathname: this is relative!
# created: time in seconds since the epoch as a float
@gangsthub
gangsthub / _cols.scss
Last active March 27, 2018 08:15
Dynamic RWD cols
// collections
$CONTAINER-WIDTHS: (
5,
10,
20,
30,
40,
50,
60,
@denisoster
denisoster / nginx.conf
Last active April 13, 2024 12:20
Nginx+RoR(Puma)+Nuxt.js(node.js)+SSL+redirect
upstream icon {
server unix:/home/icon/web/site.ru/icon/shared/sockets/puma.sock fail_timeout=0;
}
server {
listen 80;
server_name site.ru www.site.ru;
rewrite ^(.+)$ https://site.ru$uri permanent;
}
@developit
developit / *state-machine-component.md
Last active February 6, 2021 00:44
265b lib for building pure functional state machine components. https://github.com/developit/state-machine-component

state-machine-component

A tiny (265 byte) utility to create state machine components using two pure functions.

🔥 JSFiddle Demo

Usage

The API is a single function that accepts 2 pure functions as arguments:

@sdnts
sdnts / example.md
Last active January 10, 2023 20:50
Postman pm.sendRequest example

To send a request via the sandbox, you can use pm.sendRequest.

pm.test("Status code is 200", function () {
    pm.sendRequest('https://postman-echo.com/get', function (err, res) {
        pm.expect(err).to.not.be.ok;
        pm.expect(res).to.have.property('code', 200);
        pm.expect(res).to.have.property('status', 'OK');
    });
});
@cecilemuller
cecilemuller / readme.md
Last active March 14, 2022 17:53
Using Three.js "examples" (e.g. OrbitControls) with Webpack 2

Javascript files from the examples folder (such as OrbitControls) are not CommonJS or ES Modules, but they can still be used in Webpack bundles:

In package.json:

"dependencies": {
	"three": "0.84.0",
	"webpack": "2.4.1"
}
@davidnaviaweb
davidnaviaweb / functions.php
Created October 1, 2016 09:57
WordPress Dashboard tips & tricks @ WC Sevilla 2016
<?php
/**
* Mostrar / Ocultar Admin Bar
*
* Según el Codex, basta retornar el valor 'false' en la función 'show_admin_bar' para ocultar
* la barra de administración. Sin embargo, esta implementación parece que no funciona correctamente.
*
*/
function remove_admin_bar($show_admin_bar)
{
@DianaEromosele
DianaEromosele / Change "origin" of your GIT repository
Created August 7, 2016 00:31
Change "origin" of your GIT repository
$ git remote rm origin
$ git remote add origin git@github.com:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
@ericclemmons
ericclemmons / example.md
Last active April 24, 2024 18:09
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 Summary Goes Here
@maxvt
maxvt / infra-secret-management-overview.md
Last active February 28, 2024 20:53
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.