Skip to content

Instantly share code, notes, and snippets.

View afr-dt's full-sized avatar
:octocat:

Alejandro Flores afr-dt

:octocat:
  • Personal
  • Mexico City
View GitHub Profile

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@primaryobjects
primaryobjects / react-confirm.js
Created November 1, 2017 19:03
A simple example of a confirm alert dialog in ReactJs / React.
<div className='delete-button' onClick={() => { if (window.confirm('Are you sure you wish to delete this item?')) this.onCancel(item) } } />
@toddbirchard
toddbirchard / pandas_dataframe_difference.py
Last active August 26, 2023 00:48
Helper function to compare two DataFrames and find rows which are unique or shared.
"""Find Symmetric Differences between two Pandas DataFrames."""
def dataframe_difference(df1, df2, which=None):
"""Find rows which are different."""
comparison_df = df1.merge(
df2,
indicator=True,
how='outer'
)
import pytesseract
import os
import sys
def read_image(img_path, lang='eng'):
"""
Performs OCR on a single image
:img_path: str, path to the image file
@joshatxantie
joshatxantie / gist:4bcf5d0243fba63845fce7cc40365a3a
Created September 2, 2021 04:18
Dockerize Pyodbc/SQL Server
# syntax=docker/dockerfile:1
FROM python:3.8-slim-buster
WORKDIR /app
ENV ACCEPT_EULA=Y
RUN apt-get update -y && apt-get update \
&& apt-get install -y --no-install-recommends curl gcc g++ gnupg unixodbc-dev
@adrienjoly
adrienjoly / fix-dyld-missing-symbol-called-errors-on-m1-macs.md
Last active June 5, 2024 09:59
Fix `dyld[]: missing symbol called` errors when running Node.js programs on M1 Macs (apple silicon)

Problem

If you're getting this kind of error when running Node.js programs with binary dependencies that don't support M1 yet, e.g.:

$ yarn test
dyld[51175]: missing symbol called
dyld[51176]: missing symbol called