Skip to content

Instantly share code, notes, and snippets.

View randaalex's full-sized avatar

Alexander Randa randaalex

View GitHub Profile
@randaalex
randaalex / qqq.md
Last active November 9, 2017 08:23
qqq

Usage in testing and development

gitlab-test is used to seed your local gdk GitLab application and is also used in rspec tests. Because of this, when building and testing features that require a specific type of file, you can add them to the gitlab-test repo in order to access that blob during development or testing.

  1. Push a new file on a new branch to gitlab-org/gitlab-test.
  2. Execute rm -rf tmp/tests in your gitlab repo.
  3. Add your branch and its head commit to the BRANCH_SHA hash in test_env.rb. In rspec, you can use create(:project) to create an instance of gitlab-test that has a path of gitlabhq.
@randaalex
randaalex / task3-result.sh
Created September 28, 2015 12:56
Task 2 and 3
$ ruby task3.rb
["4 Ian Kehoe", "5 Nora Dempsey", "6 Theresa Enright", "8 Eoin Ahearn", "11 Richard Finnegan", "12 Christina McArdle", "13 Olive Ahearn", "15 Michael Ahearn", "17 Patricia Cahill", "23 Eoin Gallagher", "24 Rose Enright", "31 Alan Behan", "39 Lisa Ahearn"]
Run options: --seed 21462
# Running:
....................
Finished in 0.018345s, 1090.2059 runs/s, 1090.2059 assertions/s.
# set your user tokens as environment variables, such as ~/.secrets
# See the README for examples.
[color]
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
@randaalex
randaalex / enumerable.rb
Last active August 29, 2015 14:15
fibonachi
num = 15
fib = Enumerator.new do |y, z|
a = b = 1
loop do
y << a
a, b = b, a+b
break if a > num
end
end
#!/bin/bash
BROWSER='google-chrome'
GITLAB_SECRET='xxx'
ENDPOINT='https://gitlab.devnet.by/api/v3'
PROJECT='activebilling/core'
PROJECT_ID=177
ACTION="projects/$PROJECT_ID/merge_requests"
CURRENT_BRANCH=`git branch | grep '^\*' | awk '{ print $2; }'`
[user]
name = Alexander Randa
email = randa.alex@active.by
[color]
diff = auto
status = auto
branch = auto
ui = true
[alias]
#include <stdio.h>
#include <iostream>
#include <math.h>
#define _USE_MATH_DEFINES
using std::cout;
using std::cin;
using std::endl;
int main(void)
default namespace sa = "http://apstandard.com/ns/1"
namespace local = ""
grammar {
start = Application
Application = element application {
## Version of APS format used
attribute version { "1.2" },
#include <stdio.h>
#include <iostream>
#include <math.h>
using std::cout;
using std::cin;
using std::endl;
int main(void)
{
#include <stdio.h>
#include <iostream>
#include <math.h>
using std::cout;
using std::cin;
using std::endl;
int main(void)
{