Skip to content

Instantly share code, notes, and snippets.

View Tzolkin's full-sized avatar

Francisco Zavala Tzolkin

View GitHub Profile
@Tzolkin
Tzolkin / gist:96eee944b7ed77cd9f6f5f7c2d6216bb
Created June 6, 2023 18:07 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@Tzolkin
Tzolkin / useGeolocation.md
Created September 30, 2021 05:26 — forked from whoisryosuke/useGeolocation.md
React Hooks - Geolocation use native browser API

useGeolocation

React sensor hook that tracks user's geographic location.

Hook

const useGeolocation = () => {
  const [state, setState] = useState({
    accuracy: null,
@Tzolkin
Tzolkin / xcode_update_issue.md
Last active January 23, 2020 16:37
openssl@1.1 dependencies and I386 arch error

After update on mac 10.15.2 I got the following error:
/Users/tzolkin/.rbenv/versions/2.2.2/lib/ruby/2.2.0/digest.rb:15:in `const_missing': library not found for class Digest::SHA1 -- digest/sha1 (LoadError)

Steps

  1. Remove the rbenv old version
rbenv uninstall 2.2.0
  1. Install openssl@1.0
@Tzolkin
Tzolkin / curl-smtp-email.sh
Created May 22, 2019 15:53 — forked from james2doyle/curl-smtp-email.sh
Send SMTP email using cURL
curl --connect-timeout 15 -v --insecure "smtp://smtp.example.com:25" -u "username:password"
\ --mail-from "sender@example.com" --mail-rcpt "destination@example.com"
\ -T email-contents.txt --ssl
@Tzolkin
Tzolkin / find_dups.rb
Created December 13, 2018 21:47 — forked from rob-murray/find_dups.rb
Rails find duplicate records
columns_that_make_record_distinct = [:some_id, :another_name]
distinct_ids = Model.select("MIN(id) as id").group(columns_that_make_record_distinct).map(&:id)
duplicate_records = Model.where.not(id: distinct_ids)
@Tzolkin
Tzolkin / https-thin-config.sh
Created November 21, 2017 17:33
Create a certificate to work on develop environment for RoR & Thin
# 1) Create your private key (any password will do, we remove it below)
$ cd ~/.ssh
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@Tzolkin
Tzolkin / capybara cheat sheet
Created February 22, 2016 21:43 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@Tzolkin
Tzolkin / API.md
Last active August 29, 2015 14:19 — forked from iros/API.md

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

# rubocop config files for small Rails4/Ruby2 project
# blog post: http://joanswork.com/rubocop-rails-getting-started/
# .rubocop.yml
AllCops:
Include:
- Rakefile
- config.ru
Exclude: