Skip to content

Instantly share code, notes, and snippets.

@solilokiam
solilokiam / reactive2017_lightning_talk.md
Last active August 27, 2023 14:22
React and 7.5 Million Daily Users | Proposal for lightning talk at Reactive Conf 2017

This is a proposal for a ⚡lightning talk at the Reactive 2017 conference.

🌟 Please star it so we can make it to the top 10 and be choosen to make it.

React and 7.5 Million Daily Users

1 year ago our design team came with the idea of redesigning our frontend... We decided to do it with React. One year later and some millions of satisfied users it's time to share the amazing and hard lessons we have learned. Some of those lessons are about:

  • SSR and SPA SEO
@AdySan
AdySan / TrimLast18s
Created December 27, 2016 22:58
Bash script to trim last few seconds of video files (.mp4) downloaded with you-get using ffmpeg
#!/bin/bash
for f in *.mp4; do
duration=$(ffmpeg -i "$f" 2>&1 | grep "Duration"| cut -d ' ' -f 4 | sed s/,//)
length=$(echo "$duration" | awk '{ split($1, A, ":"); print 3600*A[1] + 60*A[2] + A[3] }' )
trim_start=0
trim_end=$(echo "$length" - 18 - "$trim_start" | bc)
ffmpeg -ss "$trim_start" -i "$f" -c copy -map 0 -t "$trim_end" "${f%.mp4}-trimmed.mp4"
done
@RobertoSchneiders
RobertoSchneiders / deploy_with_ebcli3_on_circleci.md
Last active December 4, 2023 09:07
Settings to deploy to AWS Elastic Beanstalk on CircleCi (EB Cli 3)

This is how I configured the deploy of my rails apps to AWS Elastic Beanstalk through CircleCI 1.0.

If you are using the Circle CI 2.0, take a look at this article from ryansimms

Configure Environments Variables

On Project Settings > Environment Variables add this keys:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
    The aws user must have the right permissions. This can be hard, maybe, this can help you.
@joshdholtz
joshdholtz / .env
Created March 4, 2015 01:26
Fastlane with different brands
# General ENV stuff used for all environments (brands)
WORKSPACE=YouApp.xcworkspace
@asmallteapot
asmallteapot / .gitattributes
Last active March 31, 2022 11:43
Diff Xcode localizable strings files in Git.
*.strings utf16 diff=localizablestrings
@iampeterbanjo
iampeterbanjo / gist:7041182
Last active December 25, 2015 21:19
Problem testing Alloy controllers based on alloy-unit-test
it('create with 2 items', function () {
item.set({
title: "The cloud atlas",
author: "David Mitchell"
});
item.save();
item.set({
title: "Design of design",
author: "Brooks"
@FokkeZB
FokkeZB / DOWNSIZE.md
Last active December 8, 2016 10:39
Automatically generate non-retina and Android images for Alloy projects

UPDATE: With the assets command of the TiCons CLI / Module this can be done even simpeler by calling $ ticons assets or an alloy.ymk using:

task("pre:load", function(event, logger) {
    require('ticons').assets();
});

@FokkeZB
FokkeZB / LAZY.md
Last active December 16, 2015 21:39
Lazy exporting expensive properties

If you have a CommonJS module that exposes properties that are expensive to create (e.g. other CommonJS modules or some external resource), you can load them lazy using Object.defineProperty().

@P7h
P7h / IntelliJ_IDEA__Perf_Tuning.txt
Last active March 22, 2024 20:18
Performance tuning parameters for IntelliJ IDEA. Add these params in idea64.exe.vmoptions or idea.exe.vmoptions file in IntelliJ IDEA. If you are using JDK 8.x, please knock off PermSize and MaxPermSize parameters from the tuning configuration.
-server
-Xms2048m
-Xmx2048m
-XX:NewSize=512m
-XX:MaxNewSize=512m
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+UseParNewGC
-XX:ParallelGCThreads=4
-XX:MaxTenuringThreshold=1
@dework
dework / MenuBuilder.php
Created December 1, 2012 18:18
Symfony 2 breadcrumbs based on KnpMenuBundle
<?php
namespace Chyrius\PublicBundle\Menu;
use Knp\Menu\FactoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Chyrius\PublicBundle\Menu\RequestVoter;
use Symfony\Component\DependencyInjection\ContainerInterface;
class MenuBuilder