Skip to content

Instantly share code, notes, and snippets.

View 7ictor's full-sized avatar

Victor Rodríguez 7ictor

View GitHub Profile

Repo

Haven't decided if I am going to submit code to it yet

Questions

👍 - Unlocked & Done 😊 - Locked & Done 🔒 - Locked & Not Done [] - Not yet Done

@getify
getify / 1.js
Last active June 2, 2020 11:07
multiple-field sorter
var data = [
{ a: 4, b: 12, c: "elderberry" },
{ a: 2, b: 10, c: "cherry", d: 4 },
{ a: 4, b: 12, c: "durian" },
{ a: 2, b: 10, c: "cherry", },
{ a: 3, b: 12, c: "durian" },
{ a: 1, b: 10, c: "apple", },
{ a: 1, b: 11, c: "apple", },
{ a: 1, b: 11, c: "banana", },
{ a: 2, b: 10, c: "banana", },
@tylermilner
tylermilner / copy_appropriate_google-service-info-plist.sh
Last active April 29, 2024 14:50
A shell script to selectively copy your GoogleService-Info.plist into your app bundle based on the current build configuration.
# Name of the resource we're selectively copying
GOOGLESERVICE_INFO_PLIST=GoogleService-Info.plist
# Get references to dev and prod versions of the GoogleService-Info.plist
# NOTE: These should only live on the file system and should NOT be part of the target (since we'll be adding them to the target manually)
GOOGLESERVICE_INFO_DEV=${PROJECT_DIR}/${TARGET_NAME}/Firebase/Dev/${GOOGLESERVICE_INFO_PLIST}
GOOGLESERVICE_INFO_PROD=${PROJECT_DIR}/${TARGET_NAME}/Firebase/Prod/${GOOGLESERVICE_INFO_PLIST}
# Make sure the dev version of GoogleService-Info.plist exists
echo "Looking for ${GOOGLESERVICE_INFO_PLIST} in ${GOOGLESERVICE_INFO_DEV}"
@spara
spara / docker-ce-17.05-ubuntu-16.04-LTS-install.md
Last active August 9, 2023 09:04
Install Docker CE 17.05 and Compose 1.13.0

Installing Docker CE Edge for Ubuntu Linux

Remove previous versions of Docker and Compose

sudo apt-get purge docker-compose
sudo apt-get purge docker-ce

Install dependencies

@twolfson
twolfson / README.md
Last active November 21, 2023 11:43
Audit logging via sequelize

We prefer to have audit logging in our services that leverage databases. It gives us clarity into sources of where ACL issues might originate as well as gives us a general timeline of activity in our application.

Audit logging is tedious to set up so this gist contains our latest iteration of audit logging support for a sequelize based service.

@nolanlawson
nolanlawson / windows_node.md
Created July 27, 2016 14:04
My Windows setup for Node/npm development

My Windows setup for Node/npm development

Quick writeup on how I do Node/npm on Windows.

Instructions

  1. Install Git Bash (i.e. install Git for Windows, use the built-in Bash shell)
  2. Install windows-build-tools. Be sure to run in an elevated prompt in PowerShell (i.e. right click -> "run as administrator")
  3. Install Bash on Ubuntu on Windows
@parmentf
parmentf / GitCommitEmoji.md
Last active July 19, 2024 04:00
Git Commit message Emoji
@7ictor
7ictor / partial-update.js
Last active April 26, 2018 10:13
CouchDB update handler for partial updates of a document.
function (doc, req) {
var findTheChanges = function (prevK, obj) {
var arr = [];
for (var key in obj) {
var prevKey = prevK || '';
if (obj.hasOwnProperty(key)) {
var value = obj[key];
// If its an Object dig deeper.
if (value !== null &&
typeof value === 'object' &&
@jamtur01
jamtur01 / ladder.md
Last active July 4, 2024 19:31
Kickstarter Engineering Ladder
@paulirish
paulirish / what-forces-layout.md
Last active July 22, 2024 06:32
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent