yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<title>htm Demo</title> | |
<body> | |
<h1>no build preact htm app here:</h1> | |
<div id="app"></div> | |
</body> | |
<script type="module"> | |
// -- no build example of preact + htm, useful for small proof of concept |
Dear all Github friends,
I moved this gist to the Github repository.
Following this repository https://github.com/nijicha/install_nodejs_and_yarn_homebrew
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# An example to get the remaining rate limit using the Github GraphQL API. | |
import requests | |
headers = {"Authorization": "Bearer YOUR API KEY"} | |
def run_query(query): # A simple function to use requests.post to make the API call. Note the json= section. | |
request = requests.post('https://api.github.com/graphql', json={'query': query}, headers=headers) | |
if request.status_code == 200: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.utils.functional import curry | |
class DetailsInline(admin.TabularInline): | |
model = Details | |
# formset = DetailsFormset | |
extra = 3 | |
def get_formset(self, request, obj=None, **kwargs): | |
initial = [] | |
if request.method == "GET": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('babel-register') | |
const express = require('express') | |
const React = require('react') | |
const ReactDOMServer = require('react-dom/server') | |
const ReactRouter = require('react-router') | |
const ServerRouter = ReactRouter.ServerRouter | |
const App = require('./src/App').default | |
const path = require('path') | |
const Helmet = require('react-helmet') | |
const compression = require('compression') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
atom-text-editor { | |
-webkit-font-smoothing: antialiased; | |
} | |
atom-text-editor::shadow{ | |
.storage.type.function.arrow, .operator { | |
font-family: 'FiraCode-Retina'; | |
text-rendering: optimizeLegibility; | |
vertical-align: baseline; | |
} |
Long ago, the first time I read "The Pragmatic Programmer", I read some advice that really stuck with me.
"Don't Use Manual Procedures".
This in the chapter on Ubiquitous Automation. To summarize, they want you to automate all the things.
The trouble was that I hadn't much of an idea how to actually go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html prefix="og: http://ogp.me/ns#"> | |
<head> | |
<title>The Title</title> <!-- ˜60 chars --> | |
<meta name="description" content="The Description"> <!-- ˜150 chars --> | |
<meta property="og:title" content="The Title"> | |
<meta property="og:description" content="The Description"> <!-- ˜300 chars --> | |
<meta property="og:site_name" content="Sfida Blog"> | |
<meta property="og:locale" content="es_AR"> | |
<meta property="og:type" content="website"> | |
<meta property="og:url" content="http://www.sfidastudios.com"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* bling.js */ | |
window.$ = document.querySelector.bind(document); | |
window.$$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
NodeList.prototype.__proto__ = Array.prototype; | |
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |
NewerOlder