Skip to content

Instantly share code, notes, and snippets.

Avatar
💾
discovering

Samuel Tissot SamuelTissot

💾
discovering
  • @actualconversion
  • Montreal
View GitHub Profile
@SamuelTissot
SamuelTissot / translate.go
Created Jan 9, 2020 — forked from hvoecking/translate.go
Golang reflection: traversing arbitrary structures
View translate.go
// 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
//
View phpstorm_actions.txt
--- 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 / format.sh
Created Mar 13, 2018
Text formating in bash
View format.sh
#!/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 / .ctags
Last active Mar 1, 2018
ctags configs for vim
View .ctags
--recurse
--tag-relative=yes
--exclude=.git
--exclude=log
--exclude=.build
--exclude=.idea
--exclude=.vscode
--exclude=.settings
@SamuelTissot
SamuelTissot / quiz.js
Last active Aug 21, 2017
Lightspeed Fun Little Quiz
View quiz.js
/*
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 / Everything in second
Created Jan 13, 2017
Time representaion in second
View Everything 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