Skip to content

Instantly share code, notes, and snippets.

Avatar

victor-adrian lobo-tuerto

View GitHub Profile
@jpbecotte
jpbecotte / Vue-cli-3-Phoenix-1.3-HOWTO.md
Last active Aug 23, 2020
Vue-cli 3, Phoenix 1.3, a complete how-to
View Vue-cli-3-Phoenix-1.3-HOWTO.md

Introduction

I have been struggling to start a new project with Phoenix 1.3 and the new vue-cli 3 for Vue.js. There are tons of example already but none of them suited my needs, because:

  • I want to use the new Vue-cli to select the features that I want,
  • I do NOT want to setup Webpack (I know, what a shame!). The new Vue-cli includes the new vue-cli-service, which uses an instance of webpack-dev-server, so you don't have to import it manually in your project.
  • I do not want to use Brunch.

Create your Phoenix App

Assuming that you have Elixir and Phoenix 1.3 are both installed, let's build our new App.

@stevebauman
stevebauman / Signature.vue
Last active Sep 16, 2018
A VueJS Signature canvas field, using szimek/signature_pad
View Signature.vue
<template>
<div>
<canvas class="signature"></canvas>
<div class="clearfix"></div>
<div class="btn-group">
<button @click="clear" type="button" class="btn btn-default">
<i class="fa fa-times"></i>
@troyfontaine
troyfontaine / 1-setup.md
Last active Jan 25, 2022
Signing your Git Commits using GPG on MacOS Sierra/High Sierra
View 1-setup.md

Methods of Signing with GPG

Last updated March 28, 2021

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

@mbostock
mbostock / .block
Created Nov 23, 2016
Modifying a Force Layout II
View .block
license: gpl-3.0
@alekseykulikov
alekseykulikov / index.md
Last active Aug 8, 2020
Principles we use to write CSS for modern browsers
View index.md

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

@simonw
simonw / how-to.txt
Created Apr 13, 2016
How to create a tarball of a git repository using "git archive"
View how-to.txt
git archive --format=tar.gz -o /tmp/my-repo.tar.gz --prefix=my-repo/ master
@kristopolous
kristopolous / hn_seach.js
Last active Dec 3, 2021
hn job query search
View hn_seach.js
function query() {
var
// HN is done with very unsemantic classes.
job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.cae,.c00,.c9c,.cdd,.c73,.c88')),
query_list = Array.prototype.slice.call(arguments),
shown = 0, total = job_list.length;
// Traverses up the dom stack trying to find a match of a specific class
function up_to(node, klass) {
if (node.classList.contains(klass)) {
@mbostock
mbostock / .block
Last active Aug 31, 2020
General Update Pattern, I
View .block
license: gpl-3.0
redirect: https://observablehq.com/@d3/selection-join
@mbostock
mbostock / .block
Last active Mar 22, 2021 — forked from ZoltanLajosKis/d3jsproblem.html
Modifying a Force Layout
View .block
license: gpl-3.0
redirect: https://observablehq.com/@d3/modifying-a-force-directed-graph
View shell-execution.rb
# Ways to execute a shell script in Ruby
# Example Script - Joseph Pecoraro
cmd = "echo 'hi'" # Sample string that can be used
# 1. Kernel#` - commonly called backticks - `cmd`
# This is like many other languages, including bash, PHP, and Perl
# Synchronous (blocking)
# Returns the output of the shell command
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111