Skip to content

Instantly share code, notes, and snippets.

@vicvans20
vicvans20 / launch.json
Created June 21, 2021 19:53
9- Examples C# Visual Studio Code improvised run-debug config
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Mono C# Launch console",
"type": "coreclr",
"request": "launch",
@vicvans20
vicvans20 / 0deploy_digital_ocean.md
Last active October 28, 2021 21:48
Deploy hints and useful links for Rails/Nginx/Puma on Ubuntu server

Deploy hints and useful links for Rails/Nginx/Puma on Ubuntu server

@vicvans20
vicvans20 / 2SSL_INSTRUCTIONS.md
Last active October 15, 2021 22:45
Installation of SSL Certificates instructions (because I tend to forget the specifics)

Some instructions for easier management of SSL certificates, installation and renewal.

SQLAlchemy Stuff for multi handy purposes

@vicvans20
vicvans20 / 0RailsManyToManyCheckboxTrick
Last active August 22, 2018 00:01
Rails - Create many to many records between two models displaying one of the parent info on the other parent form.
Create many to many records between two models displaying one of the parent info on the other parent form.
@vicvans20
vicvans20 / 0RailsLdapLoginWithEmailOrUsername.md
Last active August 22, 2018 00:02
Rails with ActiveDirectory/Devise login with email or username (using devise_ldap_authenticatable gem)

Rails with ActiveDirectory/Devise login with email or username (using devise_ldap_authenticatable gem)

@vicvans20
vicvans20 / warranty_from_tags.liquid
Created February 20, 2018 18:39
Shopify/Liquid - Get the warranty from tags
{% comment %}
Liquid cannot create arrays directly...
First create a "array" of the warranty tags available in the store and then check in the product tags
the existence of any of the warranty tags.
{% endcomment %}
{% assign warranty_list = "30 dias|60 dias|3 meses|1 año|2 años|3 años|4 años|5 años" %}
{% assign warranty_list = warranty_list | split: '|' %}
{% assign warranty = false %}
@vicvans20
vicvans20 / deploy.rb
Created December 13, 2017 17:29
My Mina setup with JRUBY
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
# require 'mina/rbenv' # for rbenv support. (http://rbenv.org)
require 'mina/rvm' # for rvm support. (http://rvm.io)
require 'mina/puma'
set :application_name, 'APP_NAME'
set :domain, '1.1.1.1'
set :deploy_to, '/home/USER/apps/APP_NAME'
@vicvans20
vicvans20 / 0MamoothHtmlParserExample.md
Last active August 21, 2018 23:59
Mammoth docx to html custom style map

Gist title

@vicvans20
vicvans20 / left_labels_tag_components.rb
Last active November 15, 2017 18:07
Rails SimpleForm setup with semantic_ui
# Extra setup for :semantic_ui_left_labeled_input
# Inside /config/initializers/simple_form/left_labels_tag_components
module SimpleForm
module Components
module LeftLabelTags
def left_label (wrappers_options = nil)
@icon_tag ||= begin
# Made to be used as currency label, but if specified
# left label can be changed with [:l_lab]
options[:l_lab] ||= '$'