Skip to content

Instantly share code, notes, and snippets.

View alexanmtz's full-sized avatar
🎯
Focusing

Alexandre Magno alexanmtz

🎯
Focusing
View GitHub Profile
@souzagab
souzagab / OpenSSL-Fix.md
Last active December 24, 2023 06:26
Install OpenSSL 1.0.2 via Homebrew ( Fix for older Ruby Versions )

How to fix openSSL incompatibility issues in older Ruby Versions. (<=2.3)

Homebrew

Install openssl 1.0.2 via homebrew :

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/64555220bfbf4a25598523c2e4d3a232560eaad7/Formula/openssl.rb -f

This should install openssl in /usr/local/opt/openssl

If you already have 1.1 installed, you should have 2 versions of opensll in: /user/local/opt/

@odykyi
odykyi / file.js
Last active April 12, 2021 06:13
const hashCode = str => str.split('').reduce((prevHash, currVal) =>
(((prevHash << 5) - prevHash) + currVal.charCodeAt(0)) | 0, 0);
const sortByTime = (trx, nextTrx) => new Date(trx.time) - new Date(nextTrx.time);
const getMinutesFromDates = (startDate, endDate) => {
const difference = new Date(endDate).getTime() - new Date(startDate).getTime();
return (difference / 60000);
};
const findDuplicateTransactions = (transactions = []) => {
let map = new Map();
@lfalke
lfalke / StripeCardsSection.js
Last active August 8, 2023 05:10
Usage of react-stripe-elements with Material UI (v1.0) styling
import React, { PureComponent } from 'react'
import Grid from 'material-ui/Grid'
import { CardNumberElement, CardExpiryElement, CardCVCElement } from 'react-stripe-elements'
import StripeElementWrapper from './StripeElementWrapper'
export default class extends PureComponent {
static displayName = 'StripeCardsSection'
<head>
<style> body { margin: 0; } </style>
<script src="//unpkg.com/3d-force-graph"></script>
<script src="//cdn.rawgit.com/neo4j/neo4j-javascript-driver/1.2/lib/browser/neo4j-web.min.js"></script>
<!--<script src="../../dist/3d-force-graph.js"></script>-->
</head>
<body>
<div id="3d-graph"></div>
@cbaretzky
cbaretzky / boot.py
Created November 5, 2017 16:12
boot.py for esp8266 with micropython
# This file is executed on every boot (including wake-boot from deepsleep)
#Get out of the UART with mismatched baudrate on the serial
print(' '*40+'\n')
print('Start booting')
autoconnect_timeout = 80
deepsleep_seconds = 2000
fail_deepsleep = 600
known_APS=[['AP1','PW1'], #AP1 : SSID of first AP, PW1 passwd for first AP
@ntamvl
ntamvl / install-multiple-jdk-on-macos-high-sierra.md
Last active February 21, 2024 11:12
Install Multiple Java Versions on macOS High Sierra

Install Multiple Java Versions on macOS High Sierra

Install Homebrew Cask

On Mac, Homebrew is the de-facto package manager, and Homebrew Cask is the app manager. I’m going to use Cask to install Java 7 and 8.

Install Homebrew Cask first if you haven’t:

brew update
brew tap caskroom/cask
@spilth
spilth / android-emulator-homebrew.sh
Last active November 14, 2022 17:44
Android Emulator with Homebrew
touch ~/.android/repositories.cfg
brew cask install caskroom/versions/java8
brew cask install android-sdk
brew cask install intel-haxm
brew install qt
export ANDROID_SDK_ROOT="/usr/local/share/android-sdk"
sdkmanager "platform-tools" "platforms;android-27" "extras;intel;Hardware_Accelerated_Execution_Manager" "build-tools;27.0.0" "system-images;android-27;google_apis;x86" "emulator"
avdmanager create avd -n test -k "system-images;android-27;google_apis;x86"
/usr/local/share/android-sdk/tools/emulator -avd test
@dalegaspi
dalegaspi / brew_symlink_error_sierra.md
Last active January 4, 2024 22:32
Homebrew Symlink errors in Mac OSX High Sierra
@Ethan-code
Ethan-code / rebase_first_commit.sh
Created October 13, 2017 06:57 — forked from framon/rebase_first_commit.sh
Insert commit as first, allowing rebase of initial commit
# first you need a new empty branch; let's call it `newroot`
git checkout --orphan newroot
git rm -rf .
# then you apply the same steps
git commit --allow-empty -m 'root commit'
git rebase --onto newroot --root master
git branch -d newroot
@felipesilva
felipesilva / perceived-performance-large-scale-web-applications
Last active July 25, 2019 19:37
Sources used for the presentation @ #FrontInBH
Jakob Nielsen and Robert Miller
* https://www.nngroup.com/articles/website-response-times/
* http://yusufarslan.net/sites/yusufarslan.net/files/upload/content/Miller1968.pdf
How perceived perf can impact User Engagement
* https://www.wsj.com/articles/financial-times-hopes-speedy-new-website-will-boost-subscribers-1475553602
* https://www.doubleclickbygoogle.com/articles/mobile-speed-matters/
* https://digiday.com/media/gq-com-cut-page-load-time-80-percent/
* https://www.soasta.com/blog/introducing-a-new-web-performance-metric-for-media-sites-activity-impact-score/
* https://www.soasta.com/blog/google-mobile-web-performance-study/