Skip to content

Instantly share code, notes, and snippets.

You good?

Jean-Denis Vauguet chikamichi

You good?
View GitHub Profile
superjose / .gitlab-ci.yml
Last active March 13, 2023 00:57
This is an example of a .gitlab-ci.yml that is required for Continuous Integration on GitLab projects.
View .gitlab-ci.yml
# Reference:
# GitLab uses docker in the background, so we need to specify the
# image versions. This is useful because we're freely to use
# multiple node versions to work with it. They come from the docker
# repo.
# Uses NodeJS V 9.4.0
image: node:9.4.0
# And to cache them as well.
mosquito /
Last active March 29, 2023 21:28
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

Description=%i service with docker compose
j3j5 / gist:8b3e48ccad746b90a54a
Last active April 1, 2022 00:26
Adyen Test Card Numbers
View gist:8b3e48ccad746b90a54a
Adyen Test Card Numbers
These cards are only valid on our TEST system and they will never involve any actual transaction or transfer of funds. The TEST card numbers will not work on the Adyen LIVE Platform.
For all cards use the following expiration and CVV2/CVC2/or CID for Amex.
For all cards:
Expiration Dates CVV2 / CVC3 CID (American Express)
08/2018 OR 10/2020 737 7373
TheSeamau5 / FunctionalDataStructures.elm
Created December 25, 2014 00:03
Stacks and Queues
View FunctionalDataStructures.elm
type Stack a = Bottom | Element a (Stack a)
push : a -> Stack a -> Stack a
push element stack =
Element element stack
pop : Stack a -> (Maybe a, Stack a)
jirutka /
Last active July 8, 2022 03:54
How to use terminal on Windows and don’t go crazy…

How to use terminal on Windows without going crazy…

Windows is really horrible system for developers and especially for devops. It doesn’t even have a usable terminal and shell, so working with command line is really pain in the ass. If you really don’t want to switch to any usable system (OS X, Linux, BSD…), then this guide should help you to setup somewhat reasonable environment – usable terminal, proper shell, ssh client, git and Sublime Text as a default editor for shell.

Install stuff

  1. Download and install Git for Windows* with:
    • [✘] Use Git from the Windows Command Prompt
  • [✘] Checkout as-is, commit Unix-style line endings
awesome / ruby-multi-line-string-without-newlines-AND-ruby-multi-line-string-without-concatenation.rb
Created November 21, 2013 15:47
Ruby Multi-line String without Newlines —AND— Ruby Multi-line String without Concatenation
View ruby-multi-line-string-without-newlines-AND-ruby-multi-line-string-without-concatenation.rb
# by SoAwesomeMan
str =<<-EOS.gsub(/^[\s\t]*|[\s\t]*\n/, '') # no space "\s" for new line "\n"; kill tabs too
select awesome, awesome, awesome, awesome, awesome, awesome,
from rad, rad, rad, rad, rad, rad, rad, rad, rad, rad, rad,
where cool cool cool cool cool cool cool cool cool cool cool'
# => "select awesome, awesome, awesome, awesome, awesome, awesome,from rad, rad, rad, rad, rad, rad, rad, rad, rad, rad, rad,where cool cool cool cool cool cool cool cool cool cool cool'"
str =<<-EOS.gsub(/^[\s\t]*/, '').gsub(/[\s\t]*\n/, ' ').strip # yes space "\s" for new line "\n"; kill tabs too
bcoe / sanitize_string.rb
Last active July 10, 2018 14:50
Sanitize a search query for Lucene. Useful if the original query raises an exception, due to bad adherence to DSL. Taken from a discussion on Stack Overflow:
View sanitize_string.rb
module ElasticSearchHelpers
# sanitize a search query for Lucene. Useful if the original
# query raises an exception, due to bad adherence to DSL.
# Taken from here:
def self.sanitize_string(str)
# Escape special characters
# Special Characters
niels / Gemfile
Created April 5, 2013 14:07
Working Rails 4 w/ Compass
View Gemfile
source ""
gem "devise", git: "git://", branch: "rails4"
gem "devise-i18n", "~> 0.6.5"
gem "jbuilder", "~> 1.0.1"
gem "jquery-rails"
gem "haml", "~> 4.0.1"
gem "mongoid", git: "git://", branch: "master"
gem "simple_form", "~> 3.0.0.beta1"
gem "rails", "4.0.0.beta1"
ryansobol / gist:5252653
Last active March 20, 2023 02:24
15 Questions to Ask During a Ruby Interview
View gist:5252653

Originally published in June 2008

When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.

To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.

What to expect

Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.

kaelig / input.scss
Created November 21, 2012 22:41 — forked from blackfalcon/01_SassMeister.sass
Extending placeholder selectors within media queries
View input.scss
%myclass {
color: blue;
@media (min-width: 600px) {
background: red;
@media (min-width: 800px) {
font-size: 28px;