Skip to content

Instantly share code, notes, and snippets.

View elyalvarado's full-sized avatar

Ely Alvarado elyalvarado

  • Kitchener, ON, Canada
View GitHub Profile
@mbostock
mbostock / .block
Last active October 8, 2024 02:44
Save SVG as PNG
license: gpl-3.0
@vmadman
vmadman / logio.rb
Last active December 28, 2015 12:49
Log.io output plugin for Logstash -- logstash / lib / logstash / outputs / logio.rb
require "logstash/outputs/base"
require "logstash/namespace"
require "socket"
# Log.io Output
#
# Sends events to a Log.io server over TCP.
#
# Plugin is fault tolerant. If the plugin is unable to connect to the server,
# or writes to a broken socket, it will attempt to reconnect indefinitely.
@anibal
anibal / te-gusta-programar-y-quieres-irte-de-venezuela.md
Last active January 12, 2020 23:34
¿Te gusta programar y quieres irte de Venezuela?

SI

  • Quieres un trabajo con el que te puedas divertir mientras aprendes lo suficiente para irte de Venezuela con buenas oportunidades en el exterior.

Y

  • Te encanta programar
  • En serio, es indispensable que te apasione programar.
  • Programas hasta en tu tiempo libre como un pasatiempo.
  • Te sientes cómodo en whatever shell de Linux.
@Lerg
Lerg / prepare_icons.sh
Last active April 11, 2024 19:25
Make all app icons with imagemagick, iOS and Android
#!/bin/sh
base=$1
convert "$base" -resize '29x29' -unsharp 1x4 "Icon-Small.png"
convert "$base" -resize '40x40' -unsharp 1x4 "Icon-Small-40.png"
convert "$base" -resize '50x50' -unsharp 1x4 "Icon-Small-50.png"
convert "$base" -resize '57x57' -unsharp 1x4 "Icon.png"
convert "$base" -resize '58x58' -unsharp 1x4 "[email protected]"
convert "$base" -resize '60x60' -unsharp 1x4 "Icon-60.png"
convert "$base" -resize '72x72' -unsharp 1x4 "Icon-72.png"
convert "$base" -resize '76x76' -unsharp 1x4 "Icon-76.png"
@firefightingcode
firefightingcode / UILabel+Spacing.swift
Created November 26, 2015 15:02
An extension for UILabel to set text with specific kerning, line spacing or line height multiple
import UIKit
extension UILabel {
func setText(text: String, withKerning kerning: Double) {
self.attributedText = NSAttributedString(string: text, attributes: kerningAttribute(kerning))
}
func setText(text: String, withLineSpacing lineSpacing: CGFloat) {
self.attributedText = NSAttributedString(string: text, attributes: lineSpacingAttribute(lineSpacing))
@uchcode
uchcode / calling_osascript_from_ruby.rb
Last active December 17, 2020 21:10
calling osascript from ruby
require "open3"
def osascript language, script
Open3.capture3 "osascript", *["-l", language, :stdin_data => script]
end
def applescript script
osascript "AppleScript", script
end
@chrpinedo
chrpinedo / insert-signature-in-pdf.md
Created April 4, 2016 10:27
How to insert your signature in a PDF file by using PDFtk

How to insert your signature in a PDF file by using PDFtk

Your signature in all the sheets

  1. convert the signature image to PDF file
convert firma.png firma.pdf
@maxivak
maxivak / __readme.md
Last active February 19, 2021 19:30
Provisioning Remote server accessible by SSH with Chef and knife-zero

Provisioning remote server accessible by SSH with Chef and knife-zero.

We have a server(node) accessible by SSH. We want to provision using Chef recipes stored on our local chef repo.

We will use gem knife-zero.

Find an example of Chef repo here.

knife-zero

@damienlaughton
damienlaughton / UIAccessorizedTextField.swift
Created March 28, 2018 15:16
UIAccessorizedTextField is an iOS friendly alternative to the drop down list
//
// UIAccessorizedTextField.swift
// AccessorizedTextField
//
// Created by Damien Laughton on 28/03/2018.
// 2018 Mobilology Limited. No rights reserved.
//
import Foundation
import UIKit
@slorber
slorber / Lazy.js
Created April 23, 2018 15:30
Lazy react native comp
import React from 'react';
import {InteractionManager, ActivityIndicator} from 'react-native';
import {View} from 'glamorous-native';
const DefaultLoader = (
<View padding={20} alignItems="center" justifyContent="center">
<ActivityIndicator size="large"/>
</View>
);