Skip to content

Instantly share code, notes, and snippets.

View sourcegr's full-sized avatar

Vaggelis Papadogiannakis sourcegr

View GitHub Profile
// include ramda library
var users = [
{id:1, name: 'papas', is_published:true},
{id:2, name: 'nick', is_published:false},
{id:3, name: 'Jopahn', is_published:true}
];
@sourcegr
sourcegr / har.txt
Last active November 4, 2018 20:55
{
"always_show_minimap_viewport": true,
"animation_enabled": true,
"auto_complete_delay": 150,
"caret_extra_bottom": 6,
"caret_extra_top": 6,
"caret_extra_width": 2,
"caret_style": "blink",
"color_scheme": "Packages/Boxy Theme/schemes/Boxy Tomorrow.tmTheme",
"create_window_at_startup": false,
@sourcegr
sourcegr / css_horizontal_crolling.css
Last active April 3, 2019 12:30
CSS horizontal scrolling
.container {
display: flex;
flex-wrap: nopwrap;
scroll-snap-type: x mandatory;
overflow-x: auto;
}
.element {
flex:0 0 auto;
scroll-snap-align: center;
@sourcegr
sourcegr / vimeo_fullscreen_video.html
Last active April 3, 2019 12:35
full screen vimeo embed with iframe and Background Image on End
<script src="https://player.vimeo.com/api/player.js"></script>
<div id="top">
<div id="video-container">
<iframe id="tv-iframe" width="100%" height="100%" src="https://player.vimeo.com/video/323429785?autoplay=1&title=0&byline=0&portrait=0" frameborder="0" allow="autoplay; encrypted-media" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<div id="tv-replay"onclick="play_dtp_video(event)"></div>
</div>
</div>
<script>
var player;
const isValidEmail = email => /[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}/.test(email)
@sourcegr
sourcegr / uniq_list_from_2_lists.js
Created August 18, 2021 09:38
uniq list from two lists
/**
*
* finds stings from list2 that are not included in list1
*
*/
const list1 = '123,234,566'.split(',').map(x => x.trim());
const list2 = '123,234,566, 756, 877'.split(',').map(x => x.trim());
const results = list2.filter(x => list1.indexOf(x) === -1).join(',');