Skip to content

Instantly share code, notes, and snippets.

View marlonmantilla's full-sized avatar

Marlon Mantilla Martinez marlonmantilla

View GitHub Profile
@thomasmery
thomasmery / custom_row_renderer.jsx
Last active June 14, 2021 14:36
Adding props to a React Virtualized custom row renderer
/**
* External dependencies
*/
import React, { PureComponent, PropTypes } from 'react';
import { AutoSizer, Table } from 'react-virtualized';
/**
* Internal dependencies
**/
import getDefaultColumns from './columns'; // some columns for RV Table
@airblade
airblade / copy_attachments.rb
Created November 10, 2015 11:01
Copies S3-stored Paperclip attachments from one AR model to another
# lib/paperclip/copy_attachments.rb
# Copies S3-stored Paperclip attachments from one AR model to another.
#
# This module should be mixed into the target AR model.
if Gem::Version.new(::AWS::VERSION) >= Gem::Version.new(2)
raise NotImplementedError, 'coded for aws-sdk v1'
end
@skoji
skoji / remove-slack-settings.sh
Created November 2, 2015 03:34
remove Slack settings (OS X)
rm -rf ~/Library/Application\ Support/Slack/
rm -rf ~/Library/Containers/com.tinyspeck.slackmacgap/
rm -rf ~/Library/Preferences/com.tinyspeck.slackmacgap.plist
rm -rf ~/Library/Saved\ Application\ State/com.tinyspeck.slackmacgap.savedState
rm ~/Library/Safari/LocalStorage/*slack*
.fadeinDown {
-webkit-animation: fadeInDown 500ms ease-in-out; /* Chrome, Safari, Opera */
animation: fadeInDown 500ms ease-in-out;
}
/* Chrome, Safari, Opera */
@-webkit-keyframes fadeInDown {
0% {
@nolanlawson
nolanlawson / protips.js
Last active August 22, 2024 14:19
Promise protips - stuff I wish I had known when I started with Promises
// Promise.all is good for executing many promises at once
Promise.all([
promise1,
promise2
]);
// Promise.resolve is good for wrapping synchronous code
Promise.resolve().then(function () {
if (somethingIsNotRight()) {
throw new Error("I will be rejected asynchronously!");
@ricardo-rossi
ricardo-rossi / ElasticSearch.sh
Last active December 1, 2023 04:55
Installing ElasticSearch on Ubuntu 14.04
#!/bin/bash
### USAGE
###
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7
### ./ElasticSearch.sh will fail because no version was specified (exit code 1)
###
### CLI options Contributed by @janpieper
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch
@codler
codler / flex.less
Last active October 7, 2023 07:01
Prefix flex for IE10 and Safari / iOS in LESS
/*! Prefix flex for IE10 and Safari / iOS in LESS
* https://gist.github.com/codler/2148ba4ff096a19f08ea
* Copyright (c) 2014 Han Lin Yap http://yap.nu; MIT license */
.display(@value) when (@value = flex) {
display: -ms-flexbox; // IE10
display: -webkit-flex; // Safari / iOS
}
.display(@value) when (@value = inline-flex) {
@p-baleine
p-baleine / README.md
Created November 29, 2013 08:59
Bookshelf polymorphic association example.

Migrate

$ ./node_modules/.bin/knex:migrate:latest -c db/config.js
@ryanfitzer
ryanfitzer / Gruntfile.js
Last active August 30, 2016 15:34
An example of how to use [node-ssi](https://npmjs.org/package/ssi) in a custom Grunt task to inline all your apache includes.
module.exports = function( grunt ) {
grunt.initConfig({
pkg: grunt.file.readJSON( 'package.json' ),
buildPath: '../<%= pkg.name %>-build/',
clean: {