Skip to content

Instantly share code, notes, and snippets.

View dochoaj's full-sized avatar
🏠
Working from home

Daniel Ochoa John dochoaj

🏠
Working from home
View GitHub Profile
@dochoaj
dochoaj / mysql2-apple-silicon-macos-sonoma.md
Created September 8, 2024 23:38 — forked from fernandoaleman/mysql2-apple-silicon-macos-sonoma.md
How to install mysql2 gem on apple silicon M1, M2 or M3 macOS Sonoma

Problem

Installing mysql2 gem errors on Apple silicon M1, M2 or M3 Mac running macOS Sonoma.

Solution

Make sure mysql-client, openssl and zstd are installed on Mac via Homebrew.

Replace mysql-client with whichever mysql package you are using

@dochoaj
dochoaj / clear-sidekiq-jobs.sh
Created February 5, 2018 20:53 — forked from wbotelhos/clear-sidekiq-jobs.sh
Clear Sidekiq Jobs
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
# 3. Clear 'Processed' and 'Failed' jobs
@dochoaj
dochoaj / Movement.js
Created December 9, 2017 16:48
Epic Movement Component
import React, { Component } from 'react'
import './Movement.css'
class Movement extends Component {
render() {
return (
<div className={this.movementClass()}>
{this.renderDescription()}
{this.renderAmount()}
</div>
@dochoaj
dochoaj / TweetList.js
Created January 21, 2017 17:05
TweetList.js
import React, { Component } from 'react'
import Tweet from '../Tweet'
import './TweetList.scss'
export default class TweetList extends Component {
buildTweets() {
return this.props.tweets.map((tweet) => {
const props = {
id: tweet.id,
import React, { Component } from 'react'
import './Tweet.scss'
class Tweet extends Component {
render() {
return (
<div className="tweet-container">
<div className="tweet" data-id={this.props.id}>
<div className="tweet-image">
@dochoaj
dochoaj / webpack.config.js
Created July 21, 2016 14:47
Webpack configuration for css
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: [
'./src/index.js',
'./sass/app.scss'
],
output: {
path: __dirname,
publicPath: '/',
@dochoaj
dochoaj / trigger.js
Created June 29, 2016 21:36
Trigger bootstrap tooltip
var evt = document.createEvent("MouseEvents");
evt.initMouseEvent("mouseover", true, true, window,0, 0, 0, 0, 0, false,
false, false, false, 0, null);
$0.dispatchEvent(evt);
@dochoaj
dochoaj / gist:7dd4d574d35a9c5de564
Created October 5, 2015 21:15 — forked from edvinasbartkus/gist:0e99ea8305a20737f562
Ruby puma.gem install on El Capitan
gem install puma -- --with-cppflags=-I/usr/local/opt/openssl/include --with-ldflags=-L/usr/local/opt/openssl/lib