Skip to content

Instantly share code, notes, and snippets.

View svassr's full-sized avatar

Stéphane Vasseur svassr

  • Noème inc.
  • Montréal
View GitHub Profile
@svassr
svassr / cloudSettings
Last active February 27, 2020 05:18
vscode-settings-sync
{"lastUpload":"2020-02-27T05:18:37.622Z","extensionVersion":"v3.4.3"}
@svassr
svassr / windows-packages-install.sh
Last active January 7, 2020 15:19
Reinstall windows machine with chocolatey
# install chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install -y adobereader googlechrome firefox nodejs nvm
npm install -g gulp npm eslint
npm install --global --production windows-build-tools
choco install -y filezilla superputty jre8 vlc 7zip winrar git vscode
{"lastUpload":"2020-05-21T15:41:43.738Z","extensionVersion":"v3.4.3"}
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var styleEl = document.getElementById('css-layout-hack');
if (styleEl) {
styleEl.remove();
return;
}
styleEl = document.createElement('style');
styleEl.id = 'css-layout-hack';
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var elements = document.body.getElementsByTagName('*');
var items = [];
for (var i = 0; i < elements.length; i++) {
if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) {
items.push(elements[i]);
}
}
@svassr
svassr / SketchSystems.spec
Created May 9, 2019 15:01
Search product
Search product
Search
some event -> Products list
Products list
go to cart -> other module 1st state
details -> details
Detail Module
details
Cart
other module 1st state
@svassr
svassr / getVendorPrefix.js
Last active November 16, 2020 11:12
getVendorPrefix to apply in javascript
export function getTransformPrefix(){
return GetVendorPrefix(["transform", "msTransform", "MozTransform", "WebkitTransform", "OTransform"]);
}
export function getTransitionPrefix(){
return GetVendorPrefix(["transition", "msTransition", "MozTransition", "WebkitTransition", "OTransition"]);
}
export function getAnimationPrefix(){
@svassr
svassr / mime.types
Created December 13, 2016 22:46
Nginx missing mime types
types {
##
# many other current miemtype definitions
##
application/x-font-ttf ttf;
font/opentype otf;
application/font-woff2 woff2;
text/cache.manifest manifest;
text/cache.manifest appcache;
@svassr
svassr / find-and-kill-process.sh
Last active November 29, 2017 14:16
Handy bash command
# find and kill a specfic process
kill $(ps aux | grep '[p]ython csp_build.py' | awk '{print $2}')
# find and kill process running on a specific port
# aleternativeley you could consider using "sudo netstat -nlp | grep :80"
kill $(sudo lsof -i :80 | grep LISTEN | awk '{print $2}')
@svassr
svassr / .eslintrc
Created December 2, 2016 16:23
Linter configs
{
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
},
"globals": {
"__LOGGER__": false,