Skip to content

Instantly share code, notes, and snippets.

View xcambar's full-sized avatar

Xavier Cambar xcambar

View GitHub Profile
@flomotlik
flomotlik / gist:5709952
Last active December 18, 2015 02:18
Exported Commit variables
'CI' => true,
'CI_BUILD_NUMBER' => id,
'CI_BUILD_URL' => project_build_url(project, self),
'CI_PULL_REQUEST' => false,
'CI_BRANCH' => branch,
'CI_COMMIT_ID' => commit_id,
'CI_COMMITTER_NAME' => name,
'CI_COMMITTER_EMAIL' => email,
'CI_COMMITTER_USERNAME' => github_username,
'CI_MESSAGE' => message,
@amessinger
amessinger / Dockerfile-fakes3
Last active March 23, 2017 09:11
Fake S3 Docker Container
# https://github.com/jubos/fake-s3
FROM alpine
EXPOSE 80
RUN apk update
RUN apk add ruby ruby-rdoc ruby-irb ruby-io-console
RUN gem install fakes3
RUN mkdir -p /var/fakes3
@Raynos
Raynos / a.md
Created January 23, 2012 19:48
Shim status of ES6

ES6 what can be shimmed and what not.

Currently only lists things that can be shimmed or are experimentally implemented

Note that for any kind of decent ES6 support we need an ES6 transpiler. A few projects are attempting this [Reference SO question][3]

  • [traceur][4]
  • [Caja][5]
  • [ES transpiler][6]
@kates
kates / search_and_replace.sh
Last active August 31, 2019 05:22
bulk search and replace with the silver searcher, awk, sed and xargs
ag "sometext" --nogroup | awk '{print substr($1,1,index($1,":")-1);}' | xargs -I {} sed -i .bak -e 's/sometext/anothertext/g' {}
/* global grecaptcha */
/* global $ */
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['g-recaptcha'],
attributeBindings: ['siteKey:data-sitekey', 'data-theme', 'data-size', 'data-callback', 'data-expired-callback', 'data-tabindex'],
siteKey: '',
lang: 'sv',
resetTrigger: false,
@1stvamp
1stvamp / mac-curl-ca-bundle.sh
Created March 22, 2012 12:50
Script to install cURL CA certificates on OS X without macports
#!/bin/bash
mkdir /tmp/curl-ca-bundle
cd /tmp/curl-ca-bundle
wget http://curl.haxx.se/download/curl-7.22.0.tar.bz2
tar xzf curl-7.22.0.tar.bz2
cd curl-7.22.0/lib/
./mk-ca-bundle.pl
if [ ! -d /usr/share/curl/ ]; then
sudo mkdir -p /usr/share/curl/
else
@follmann
follmann / Manual and upstart config for AeroFS (aerofs-cli) on Ubuntu 12.04.1 LTS
Last active May 19, 2022 05:35
Manual and upstart config for AeroFS (aerofs-cli) on Ubuntu 12.04.1 LTS
Manual and upstart config for AeroFS (aerofs-cli) on Ubuntu 12.04.1 LTS:
# link standard upstart script
cd /etc/init.d
sudo ln -s /lib/init/upstart-job aerofs-cli
# create upstart config for aerofs-cli
sudo nano /etc/init/aerofs-cli.conf
(replace andreas with your desired runtime user)
----
@drogus
drogus / Rakefile.rb
Created July 26, 2013 10:49
This is the example contents of the Rakefile, which you would use to run active record tasks without using Rails. It assumes using the same directories as rails uses: `db/migrate`, `config/database.yml`.
require 'bundler/setup'
require 'active_record'
include ActiveRecord::Tasks
db_dir = File.expand_path('../db', __FILE__)
config_dir = File.expand_path('../config', __FILE__)
DatabaseTasks.env = ENV['ENV'] || 'development'
IMPORTANT
Please duplicate this radar for a Safari fix!
This will clean up a 50-line workaround.
rdar://22376037 (https://openradar.appspot.com/radar?id=4965070979203072)
//////////////////////////////////////////////////////////////////////////////
(Now available as a standalone repo.)
@kristianmandrup
kristianmandrup / Converting libraries to Ember CLI addons.md
Last active April 21, 2023 17:14
Guide to Developing Addons and Blueprints for Ember CLI

Converting libraries to Ember CLI addons

In this guide we will cover two main cases:

  • Ember specific library
  • vendor library

Ember library

The Ember library will assume that Ember has already ben loaded (higher in the loading order) and thus will assume it has access to the Ember API.