Skip to content

Instantly share code, notes, and snippets.

View ajerez's full-sized avatar
💻
Coding

Alberto Jerez ajerez

💻
Coding
View GitHub Profile
@TahaBoulehmi
TahaBoulehmi / heroku.env.js
Created September 16, 2022 10:01
Export Heroku env
// This script lets you export all heroku config vars
// 1) Go to your app settings and reveal config vars
// 2) Open the console and run this code:
// BONUS: You can add this script as a bookmark.
function download(filename, text) {
var element = document.createElement('a');
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
element.setAttribute('download', filename);
@ajerez
ajerez / system-fonts.css
Last active May 13, 2019 10:58
Load System Fonts (CSS)
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
@ajerez
ajerez / .editorconfig
Created March 26, 2019 14:55
Default editor config for my projects
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
@ajerez
ajerez / server.js
Last active March 26, 2019 14:54
server.js for Heroku deployment of a Vue Project with Node and Express.js
let history = require("connect-history-api-fallback");
let express = require("express");
let path = require("path");
let serveStatic = require("serve-static");
let compression = require("compression");
let app = express();
app.use(compression());
app.use(history());
app.use(serveStatic(__dirname + "/dist"));
@gregpalaci
gregpalaci / app.vue
Last active June 7, 2018 07:42
dynamic images from a folder
<template>
<div v-for="(image, index) in images" :key="index">
<img :src='image' alt="image">
</div>
</template>
<script>
const { images } = process.env;
export default {
data() {
@ajerez
ajerez / keybindings.json
Created February 27, 2017 11:39
VSCode Keyboard Shortcuts
[
{
"key": "shift+cmd+7",
"command": "editor.action.addCommentLine",
"when": "editorTextFocus",
"args": { "block": false }
},
{
"key": "shift+cmd+6",
"command": "editor.action.removeCommentLine",
@ajerez
ajerez / settings.json
Last active April 25, 2023 06:46
VSCode Preferences
{
"workbench.fontAliasing": "default",
"editor.minimap.enabled": true,
"editor.minimap.renderCharacters": false,
"editor.tabSize": 2,
"files.autoSave": "off",
"javascript.implicitProjectConfig.checkJs": false,
"workbench.editor.enablePreviewFromQuickOpen": false,
"extensions.autoUpdate": true,
"telemetry.enableTelemetry": false,
anonymous
anonymous / blockerList.json
Created June 25, 2015 00:05
Testing Safari Content Blocker on iMore.com
[
{
"action": {
"type": "block"
},
"trigger": {
"url-filter": ".*",
"resource-type": ["script"],
"load-type": ["third-party"],
"if-domain": ["imore.com"]
@paulirish
paulirish / bling.js
Last active April 20, 2024 17:39
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}