Skip to content

Instantly share code, notes, and snippets.

View Yuriy1988's full-sized avatar

Yuriy Tatarincev Yuriy1988

View GitHub Profile
{
"Records": [
{
"eventVersion": "2.1",
"eventSource": "aws:s3",
"awsRegion": "eu-west-1",
"eventTime": "2021-05-31T14:20:42.582Z",
"eventName": "ObjectCreated:Put",
"userIdentity": {
"principalId": "A1QU9BML00BASO"
@Yuriy1988
Yuriy1988 / Jenkinsfile
Created March 28, 2018 12:30 — forked from jonico/Jenkinsfile
Example for a full blown Jenkins pipeline script with multiple stages, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, stage timeouts, stage concurrency constraints, ...
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
/*
Please make sure to add the following environment variables:
HEROKU_PREVIEW=<your heroku preview app>
HEROKU_PREPRODUCTION=<your heroku pre-production app>
HEROKU_PRODUCTION=<your heroku production app>
{
"movies": [
{
"id": 1,
"title": "The Shawshank Redemptoin",
"posterUrl": "https://images-na.ssl-images-amazon.com/images/M/MV5BODU4MjU4NjIwNl5BMl5BanBnXkFtZTgwMDU2MjEyMDE@._V1_SY500_CR0,0,336,500_AL_.jpg",
"stars": 2,
"likes": 22,
"genres": [
"Crime",
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
{
"movies": [
{
"id": 1,
"title": "The Shawshank Redemption",
"posterUrl": "https:\/\/images-na.ssl-images-amazon.com\/images\/M\/MV5BODU4MjU4NjIwNl5BMl5BanBnXkFtZTgwMDU2MjEyMDE@._V1_SY500_CR0,0,336,500_AL_.jpg",
"stars": 5,
"likes": 22,
"genres": ["Crime", "Drama"],
"actors": [
[
{
"title": "Nyckeln till frihet",
"year": "1994",
"genres": [
"Crime",
"Drama"
],
"ratings": [
8,
<!DOCTYPE html>
<html>
<head>
<title>Testing</title>
<style type="text/css">
body {
margin: 0;
}
.text {
//promises
var p = new Promise((resolve, reject) => {
resolve(1);
})
p.then(
success => { console.log(success) },
fail => { console.log(fail)
});
@Yuriy1988
Yuriy1988 / sorting.js
Last active March 28, 2017 14:52
Sorting
const data = [6,5,4,3,2,1];
function insertionSort(unsortedList) {
const list = [...data];
var len = list.length;
for (var i = 0; i < len; i++) {
var tmp = list[i]; //Copy of the current element.
/*Check through the sorted part and compare with the number in tmp. If large, shift the number*/
for (var j = i - 1; j >= 0 && (list[j] > tmp); j--) {
@Yuriy1988
Yuriy1988 / Carousel.diff
Created March 4, 2017 20:42
Carousel.diff