Skip to content

Instantly share code, notes, and snippets.

View dragan-novakovic's full-sized avatar
🏠
Working from home

Dragan Novakovic dragan-novakovic

🏠
Working from home
View GitHub Profile
@dragan-novakovic
dragan-novakovic / redis_cheatsheet.bash
Created February 4, 2020 18:38 — forked from LeCoupa/redis_cheatsheet.bash
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
@dragan-novakovic
dragan-novakovic / playground.rs
Created December 9, 2018 12:23 — forked from rust-play/playground.rs
Code shared from the Rust Playground
use std::collections::HashSet;
fn destroy(input_sets: Vec<HashSet<char>>) -> String {
let char_list:String = String::from("a b c d e f g h i j k l m n o p q r s t u v w x y z");
let char_vec:Vec<_> = char_list.split(' ').map(|x| x.to_string()).collect();
let mut fil_vec:Vec<_> = vec![];
for set in input_sets {
fil_vec = char_vec.iter().filter(|&x| !set.iter().any(|y| y.to_string() == x.clone())).collect::<Vec<_>>();
import { fromEvent } from 'rxjs';
import { ajax } from 'rxjs/ajax';
import { map, filter, debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';
const searchBox = document.getElementById('search-box');
const typeahead = fromEvent(searchBox, 'input').pipe(
map((e: KeyboardEvent) => e.target.value),
filter(text => text.length > 2),
debounceTime(10),
@dragan-novakovic
dragan-novakovic / gist:39eee70066e40cdec4452096de283bf3
Created November 2, 2018 17:07
input type date custom styling
::-webkit-datetime-edit { padding: 1em; }
::-webkit-datetime-edit-fields-wrapper { background: silver; }
::-webkit-datetime-edit-text { color: red; padding: 0 0.3em; }
::-webkit-datetime-edit-month-field { color: blue; }
::-webkit-datetime-edit-day-field { color: green; }
::-webkit-datetime-edit-year-field { color: purple; }
::-webkit-inner-spin-button { display: none; }
::-webkit-calendar-picker-indicator { background: orange; }
@dragan-novakovic
dragan-novakovic / webdev_online_resources.md
Created July 18, 2018 12:11 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)