Skip to content

Instantly share code, notes, and snippets.

View SamuelTissot's full-sized avatar
💾
discovering

Samuel Tissot SamuelTissot

💾
discovering
  • Montreal
View GitHub Profile
@SamuelTissot
SamuelTissot / Everything in second
Created January 13, 2017 03:08
Time representaion in second
MINUTE_IN_SECONDS = 60
HOUR_IN_SECONDS = 60 * MINUTE_IN_SECONDS
DAY_IN_SECONDS = 24 * HOUR_IN_SECONDS
WEEK_IN_SECOND, = 7 * DAY_IN_SECONDS
MONTH_IN_SECONDS = 30 * DAY_IN_SECONDS
YEAR_IN_SECONDS = 365 * DAY_IN_SECONDS
@SamuelTissot
SamuelTissot / quiz.js
Last active August 21, 2017 12:29
Lightspeed Fun Little Quiz
/*
QUESTION:
Given the following condition, define "explode()"
GUIDELINES:
can can be as creative of simplistic as you want, there is more than one way to do it
*/
if ('awesome'.explode() === 'a w e s o m e') {
@SamuelTissot
SamuelTissot / .ctags
Last active March 1, 2018 15:43
ctags configs for vim
--recurse
--tag-relative=yes
--exclude=.git
--exclude=log
--exclude=.build
--exclude=.idea
--exclude=.vscode
--exclude=.settings
@SamuelTissot
SamuelTissot / format.sh
Created March 13, 2018 15:15
Text formating in bash
#!/bin/bash
# Reset
Color_Off='\033[0m' # Text Reset
# Regular Colors
Black='\033[0;30m' # Black
Red='\033[0;31m' # Red
Green='\033[0;32m' # Green
Yellow='\033[0;33m' # Yellow
@SamuelTissot
SamuelTissot / phpstorm_actions.txt
Created August 7, 2019 17:42
phpstorm actions
--- Actions ---
$Copy <C-C> <C-Ins>
$Cut <C-X> <S-Del>
$Delete <Del>
$LRU
$Paste <C-V> <S-Ins>
$Redo <C-S-Z> <A-S-BS>
$SearchWeb
$SelectAll <C-A>
$Undo <C-Z> <A-BS>
@SamuelTissot
SamuelTissot / translate.go
Created January 9, 2020 02:25 — forked from hvoecking/translate.go
Golang reflection: traversing arbitrary structures
// Traverses an arbitrary struct and translates all stings it encounters
//
// I haven't seen an example for reflection traversing an arbitrary struct, so
// I want to share this with you. If you encounter any bugs or want to see
// another example please comment.
//
// The MIT License (MIT)
//
// Copyright (c) 2014 Heye Vöcking
//