Skip to content

Instantly share code, notes, and snippets.

Avatar

Alejandro AR kinduff

View GitHub Profile
@kinduff
kinduff / README.md
Last active Jun 24, 2020
Fix Github Header using Stylus
View README.md

Fix Github Header using Stylus

Step 1: Install Stylus

Step 2: Install the style

Install directly with Stylus

@kinduff
kinduff / donquijote.txt
Last active Apr 26, 2020
Don Quijote de la Mancha en Texto Plano
View donquijote.txt
This file has been truncated, but you can view the full file.
Capítulo I. Que trata de la condición y ejercicio del famoso hidalgo don Quijote de la Mancha
View keybase.md

Keybase proof

I hereby claim:

  • I am kinduff on github.
  • I am kinduff (https://keybase.io/kinduff) on keybase.
  • I have a public key whose fingerprint is 1560 2754 A367 26FA 204F 588E 111B 8174 3316 4BC9

To claim this, I am signing this object:

@kinduff
kinduff / package.json
Last active May 23, 2019
Social Image
View package.json
{
"name": "social-image",
"version": "1.0.0",
"description": "Creates a dynamic social image for Kinduff's blog posts",
"main": "social-image.js",
"scripts": {
"test": "echo \"What a shame! No test specified\" && exit 1"
},
"author": "Alejandro AR <kinduff>",
"license": "MIT",
View gist:a0a9aeeff36b05a5eed85a1e3a558a50
Add the base code to any page where you want to track conversions. If you want to use retargeting, add this code to every page of your site to create audiences to retarget later.
Be sure to put the base code between the <head> and </head> tags in your HTML document. It should only appear once on a single page, and before the subsequent event code.
Use Enhanced Match to get improved visibility into your conversion data—passing back email data on a conversion lets us better attribute it to an event on Pinterest. To use Enhanced Match, pass back the converting user’s email (or the SHA256 hash of their email) in the em parameter highlighted in blue. For more detailed instructions, visit our help center.
<!-- Pinterest Tag -->
<script>
!function(e){if(!window.pintrk){window.pintrk = function () {
window.pintrk.queue.push(Array.prototype.slice.call(arguments))};var
n=window.pintrk;n.queue=[],n.version="3.0";var
t=document.createElement("script");t.async=!0,t.src=e;var
r=document.getElementsByTagNa
View HN_sort_by_votes.js
javascript:(function()%7B'use%20strict'%3B%2F%2F%20This%20let%20statement%20selects%20elements%20from%20the%20HTML%20document%20using%20a%20CSS%20selector.%2F%2F%20Specifically%2C%20we're%20making%20an%20Array%20of%20all%20table%20rows%20(each%20news%20listing%20is%2F%2F%20a%20table%20row%20in%20an%20html%20table).%20The%20css%20selector%20here%20says%2C%20find%20the%20'tr'%20elements%2F%2F%20that%20are%20nested%20at%20any%20depth%20below%20a%20tbody%20which%20is%20nested%20at%20any%20depth%20below%20any%2F%2F%20element%20bearing%20the%20class%20'itemlist'%20--%20the%20dot%20in%20front%20of%20itemlist%20indicates%2F%2F%20we're%20talking%20about%20a%20CSS%20class%2C%20not%20an%20element.%2F%2F%20Look%20up%20css%20selectors%20and%20the%20document.querySelectorAll%2F%2F%20function%20for%20more%20about%20that.%2F%2F%20When%20you%20do%20a%20querySelectorAll%2C%20you%20get%20a%20NodeList%20in%20return%2C%20not%20quite%20the%20same%2F%2F%20thing%20as%20an%20array%2C%20because%20you%20can't%20slice%20it.%20Well%2C%20
View keybase.md

Keybase proof

I hereby claim:

  • I am kinduff on github.
  • I am kinduff (https://keybase.io/kinduff) on keybase.
  • I have a public key whose fingerprint is AE52 2EFE 9214 C2DE D5B0 FB33 6592 95DE E5B8 4DAD

To claim this, I am signing this object:

View json_parse.sh
# Using JSON.sh as a JSON parser
# Download https://github.com/dominictarr/JSON.sh
function jsonGetValue {
./JSON.sh | grep -F -e $1 | cut -f2 | tr -d '"'
}
# Usage
read -r -d '' JSON_DATA <<'EOF'
{
View insertion_sort.rb
def sort(values)
length = values.size - 1
1.upto(length) do |i|
temp = values[i]
j = i - 1
while j >= 0 and values[j] > temp
values[j+1] = values[j]
j -= 1
View bubble_sort.rb
def sort(values)
length = values.size - 2
swapped = true
while swapped
swapped = false
0.upto(length) do |i|
if values[i] > values[i+1]
values[i], values[i+1] = values[i+1], values[i]
You can’t perform that action at this time.