Skip to content

Instantly share code, notes, and snippets.

@kevin-smets
kevin-smets / iterm2-solarized.md
Last active March 26, 2024 23:40
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@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.
@RobertoSchneiders
RobertoSchneiders / elasticbeanstalk_deploy_iam_policy.md
Last active October 11, 2023 11:35
IAM Policy for deploy on Elastic Beanstalk

I am deploying with this IAM using Codeship and Circle CI to Elastic Beanstalk. I had a lot of trouble with this config. I talked to the aws support for about 6 hours until this worked properly, so, I guess it is worth to share.

UPDATE: In the end, I have to use the AWSElasticBeanstalkFullAccess policy. My custom policy keep breaking every week with some new added permission or some EB internal change. Anyway, the IAM I was using is below.

This works for me with CircleCI and EB Cli.

{
    "Version": "2012-10-17",
    "Statement": [
        {
@mattd
mattd / gist:1006398
Created June 3, 2011 14:12
nginx try_files with a proxy_pass
server {
root /var/www/example.com/static;
server_name example.com;
access_log /var/log/nginx/example.com.access.log;
error_log /var/log/nginx/example.com.error.log;
try_files /maintenance.html @proxy;
location @proxy {
proxy_pass http://127.0.0.1:10001;
@samselikoff
samselikoff / future-proof.md
Last active April 21, 2023 17:14
Future-proofing your Ember 1.x code

This post is also on my blog, since Gist doesn't support @ notifications.


Components are taking center stage in Ember 2.0. Here are some things you can do today to make the transition as smooth as possible:

  • Use Ember CLI
  • In general, replace views + controllers with components
  • Only use controllers at the top-level for receiving data from the route, and use Ember.Controller instead of Ember.ArrayController or Ember.ObjectController
  • Fetch data in your route, and set it as normal properties on your top-level controller. Export an Ember.Controller, otherwise a proxy will be generated. You can use Ember.RSVP.hash to simulate setting normal props on your controller.
@jbinto
jbinto / node_debugging_tricks.md
Last active April 15, 2023 15:59
Some dumb node debugging tricks

Some dumb Node.js debugging tricks

On Nov 15 2022 @cszatmary DM'd me about a flaky test he was having trouble with.

I don't want to get too in the weeds here about the specific problem or the challenges of our codebase, but if you would like a tl;dr of the actual issue we encountered, click show gory details below:

Click here to show gory details
  • A brand new Supertest test would sometimes time out after 60 seconds, but only on CircleCI
  • Turning gzip compression off would make the tests pass reliably, this turned out to be a red herring
@devknoll
devknoll / gist:8b274f1c5d05230bfade
Last active June 13, 2022 00:07
Basic GraphQL example using the GitHub API
import { graphql, GraphQLString, GraphQLInt } from 'graphql';
import { objectType, enumType, schemaFrom, listOf } from 'graphql-schema';
import request from 'promisingagent';
const repositorySortEnum = enumType('RepositorySort')
.value('CREATED', 'created')
.value('UPDATED', 'updated')
.value('PUSHED', 'pushed')
.value('FULL_NAME', 'full_name')
.end();
@jbaxleyiii
jbaxleyiii / test.js
Created November 15, 2016 19:43
react-apollo testing
import { Component } from "react";
import { print } from "graphql-tag/printer";
import { graphql } from "react-apollo";
import { MockedProvider } from "react-apollo/test-utils";
import { addTypenameToDocument } from "apollo-client/queries/queryTransform";
import { mount } from "enzyme";
import { withSavedPayments, SAVED_ACCTS_QUERY } from "../";
@jbgo
jbgo / Vagrantfile
Created August 18, 2013 20:51
Getting started with ansible on OS X
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :private_network, ip: "192.168.33.10"
config.ssh.forward_agent = true
@jnwheeler44
jnwheeler44 / circle.yml
Created December 29, 2016 19:34
How to use Postgres 9.6.1 on circleci 14.04 image
# Other settings have been omitted, the below changes are relevant
machine:
pre:
- sudo service postgresql stop
- sudo apt-get purge -y postgresql*
- sudo apt-get update
- sudo apt-get install postgresql
- sudo service postgresql start
- sudo su - postgres -c "echo \"create user ubuntu with password 'ubuntu';\" | psql"
- sudo su - postgres -c "echo \"alter user ubuntu with superuser;\" | psql"