Skip to content

Instantly share code, notes, and snippets.

View nkapliev's full-sized avatar
🎯
Focusing

Nick Kapliev nkapliev

🎯
Focusing
View GitHub Profile
@FGRibreau
FGRibreau / existsSync.js
Last active July 17, 2023 10:19
existsSync - Check if a file exist in NodeJS
/*
fileExistSync - Check if a file exist in NodeJS
Twitter: @FGRibreau / fgribreau.com
Usage:
var fileExistSync = require('./fileExistSync');
var exist = fileExistSync('/var/folders/zm/jmjb49l172g6g/T/65b199');
Support for Nodev0.6
@ianmackinnon
ianmackinnon / match.c
Created August 8, 2012 12:01
C Regex multiple matches and groups example
# gcc -Wall -o match match.c && ./match
#
#include <stdio.h>
#include <string.h>
#include <regex.h>
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 25, 2024 06:23
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@derekjw
derekjw / gist:1764249
Created February 8, 2012 01:51
Future flatMap example
class HttpClient {
def get(uri: URI): Future[String]
}
// return Future of next URI to get
def getUri(): Future[URI]
// return's available HttpClient from a pool
def getHttpClient(): Future[HttpClient]
@endolith
endolith / gcd_and_lcm.py
Last active June 22, 2022 23:33
GCD and LCM functions in Python for several numbers
# Greatest common divisor of 1 or more numbers.
from functools import reduce
def gcd(*numbers):
"""
Return the greatest common divisor of 1 or more integers
Examples
--------