This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# By Oto Brglez - <otobrglez@gmail.com> | |
# | |
# Problem: Sometimes you have project that is build out of many "sub-projects", | |
# sub-project, can be anything, gem, rails app to single page app. And then you | |
# want to run specs for each of this project to see if everything works. Then what? | |
# | |
# Solution: On your "root" folder create Rake task that goes and executes test suite | |
# for each project and summers everything into report. Well... At least thats what this is. ;) | |
# | |
# Cheers, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Users mono | |
# Install mono via Homebrew | |
# brew install mono | |
hello.exe: | |
gmcs hello.cs | |
clean: | |
rm -rf *.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Target host: http://aioo-api.dev | |
# Testing from origin: http://aioo-spa.dev | |
# Method: "POST" | |
curl --verbose --request OPTIONS http://aioo-api.dev \ | |
--header 'Origin: http://aioo-spa.dev' \ | |
--header 'Access-Control-Request-Headers: Origin, Accept, Content-Type' \ | |
--header 'Access-Control-Request-Method: POST' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# 1. Make it executable 'chmod +x zzzs-validator.sh' | |
# 2. Use it './zzzs-validator.sh <ZZZV NUMBER> | |
HOST="https://zavarovanec.zzzs.si" | |
ANOY_SEC="/!ut/p/b1/lY_bboMwEES_JV_gtcHGeXQNKfcmITjBL4jeIhCBkkZI4evrRn1Ib6q60mq10hnNDNKoIBzsObcY2iHdVWO9r05131Xt-69ZySARfgDY50IyCOJcKU85AA4xQHEN3NmKGsCz3DBhGCT8U8_tUEBAWUwdOicA-C_9Fu3ALrOGvyTn0y6e5LhpptX51WzSyCl1JU7T5fJRrfMbIW-TY0dQiPS-7e9NvS3Snw1-yP8lwfeAFwB-GQEo9fvDEyoM5lwZycg0sSDHVEpsDtp8NGHDMNRHEnGcZrWVNVMmxYgf1qAWIiIFKfkMHXS7iGnoPbur2RveW3Gk/dl4/d5/L0lDU0lKSmdwcG1BIS9JTFNBQ0lpTXlDb2tBRUFtaWdiaVFDQUEvNEczYUQyZ2p2eWhEVXdnIS9aN182ME1BSEkwMUhPQ0s2MEkzMFUxNUNDMTBVMS8wLzI2OTIyMDY5MzkzOQ!!/" | |
ENDPOINT_URL="${HOST}/wps/portal/portali/azos/status_zavarovanja${ANOY_SEC}" | |
curl -si -X POST \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Use it like this: | |
# token=access_token_here ./fetcher.rb | |
require 'bundler/setup' | |
require 'koala' | |
require 'chronic' | |
class Fetcher |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module FilmSearch | |
extend ActiveSupport::Concern | |
included do | |
include Elasticsearch::Model | |
include Elasticsearch::Model::Callbacks | |
mapping do | |
indexes "title", type: 'string', analyzer: 'snowball' | |
indexes "signing.starts_at", type: 'date', format: 'basic_date' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
By Oto Brglez - <otobrglez@gmail.com> | |
What is FizzBuzz? http://en.wikipedia.org/wiki/Fizz_buzz | |
Requirements: Mono & Make | |
Compile with: make | |
Run with: mono ./FizzBuzz.exe | |
*/ | |
using System; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
public class FizzBuzz { | |
public static IEnumerable<String> FizzBuzzMe(int to){ | |
return Enumerable.Range(1, to).Select(j => | |
j % 3 == 0 && j % 5 == 0 ? "Fizz Buzz" : ( | |
j % 3 == 0 ? "Fizz" : ( | |
j % 5 == 0 ? "Buzz" : j.ToString() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
public class FizzBuzz { | |
public static List<String> FizzBuzzMe2(int to){ | |
List<String> list = new List<String>(); | |
int i = 1; | |
for(; i<=to; list.Add(i.ToString()), i++); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
public class FizzBuzz { | |
public static List<String> FizzBuzzMe3(int to){ | |
return Enumerable.Range(1, to).Select(i => | |
new Dictionary<int, String>(){ | |
{1, i.ToString()}, {5, "Buzz"}, {3, "Fizz"}, {3*5, "Fizz Buzz"} | |
}.Last(a => i % a.Key == 0).Value |
OlderNewer