Skip to content

Instantly share code, notes, and snippets.

@johnRivs
johnRivs / wobble.css
Last active November 30, 2020 14:11
?
/* https://twitter.com/gavinjoyce/status/1333412203232374785 */
/* https://play.tailwindcss.com/d3E0Wybzwq */
@keyframes \?wobble {
0% {
box-shadow: inset 4px 4px rgb(236, 15, 170), inset -4px -4px rgb(236, 15, 170);
}
100% {
box-shadow: inset 8px 8px rgb(236, 15, 170), inset -8px -8px rgb(236, 15, 170);
}
/* Based on https://twitter.com/argyleink/status/1312380632681586689 */
/* Can be combined with flex */
.horizontal-scrollview {
overflow: auto hidden;
-webkit-overflow-scrolling: touch;
scroll-behavior: smooth;
overscroll-behavior-x: contain;
}
// Avoid https://github.com/laravel/tinker/issues/34#issuecomment-357550126
// cd into the project and run
mkdir .psysh && echo "<?php return ['runtimeDir'=> './.psysh'];" > .psysh.php
// when you're done, run
rm -rf .psysh .psysh.php
@johnRivs
johnRivs / History\-144cbe0b\7dOI.json
Last active April 21, 2024 16:06
Visual Studio Code Settings Sync Gist
{
"explorer.confirmDelete": false,
"explorer.openEditors.visible": 0,
"window.menuBarVisibility": "toggle",
"editor.lineHeight": 40,
"editor.fontSize": 16,
"editor.fontLigatures": true,
"editor.multiCursorModifier": "ctrlCmd",
"editor.renderLineHighlight": "line",
"editor.occurrencesHighlight": "off",
@johnRivs
johnRivs / srv.sh
Last active January 27, 2017 07:49
Show service status after any service command on Ubuntu higher than 15.xx. chmod 700 srv.sh
#!/bin/sh
service "$1" "$2"
service "$1" status
@johnRivs
johnRivs / truncate.css
Created January 20, 2017 03:00
Truncate text
.truncate {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
@johnRivs
johnRivs / hidden.css
Created January 20, 2017 03:00
Hide things visually
.visually-hidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
@johnRivs
johnRivs / clearfix.css
Created January 20, 2017 02:59
Clearfix
.clearfix:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
@johnRivs
johnRivs / 1.deploy.md
Last active December 31, 2017 17:27
Deployment workflow

Step 1

Let's say you have a remote user www, your server is domain.com and your app is myapp:

www@domain.com:~$ mkdir myapp repo/myapp.git
www@domain.com:~$ cd repo/myapp.git
www@domain.com:/home/www/repo/myapp.git$ git init --bare
www@domain.com:/home/www/repo/myapp.git$ touch hooks/post-receive
www@domain.com:/home/www/repo/myapp.git$ chmod +x hooks/post-receive