Skip to content

Instantly share code, notes, and snippets.

View joonassandell's full-sized avatar

Joonas Sandell joonassandell

View GitHub Profile
@joonassandell
joonassandell / RegEx
Last active May 20, 2019 10:09
RegEx
# Delete empty lines
^\s*$
# Match tag and text spanning across multiple lines
<div[\r\s\S]+?</div>
@joonassandell
joonassandell / Easings for Flinto
Created September 22, 2018 14:10
Easings for Flinto
EaseOutSine: bezier(0,39; 0,575; 0,565; 1)
EaseInOutSine: bezier(0,445; 0,05; 0,55; 0,95)
EaseInQuad: bezier(0,55; 0,085; 0,68; 0,53)
EaseOutQuad: bezier(0,25; 0,46; 0,45; 0,94)
EaseInOutQuad: bezier(0,455; 0,03; 0,515; 0,955)
EaseInCubic: bezier(0,55; 0,055; 0,675; 0,19)
EaseOutCubic: bezier(0,215; 0,61; 0,355; 1)
EaseInOutCubic: bezier(0,645; 0,045; 0,355; 1)
EaseInQuart: bezier(0,895; 0,03; 0,685; 0,22)
EaseOutQuart: bezier(0,165; 0,84; 0,44; 1)
@joonassandell
joonassandell / Rebirth: Navbar - Default
Last active March 6, 2020 12:12
Rebirth - Default navbar html
<nav class="Navbar Navbar--default js-NavbarDefault">
<a href="/" class="Navbar-logo">Navbar</a>
<div class="Navbar-ctrl">
<div class="Navbar-ctrl-trigger js-NavbarDefaultTrigger">
<i class="Navbar-ctrl-trigger-icon"></i>
</div>
</div>
<ul>
<li class="Navbar-item">
<a class="Navbar-link" href="/">Home</a>
@joonassandell
joonassandell / TYPO3: Public resource path
Created September 22, 2017 09:26
TYPO3: Public resource path
{f:uri.resource(path:'Assets/some/thing')}
@joonassandell
joonassandell / Rebirth: TYPO3 - Powermail
Last active March 9, 2017 14:29
Rebirth: TYPO3 - Powermail
// Add to setup.txt
plugin.tx_powermail {
view {
templateRootPaths.1 = EXT:myextension/Resources/Powermail/Templates/
partialRootPaths.1 = EXT:myextension/Resources/Powermail/Partials/
layoutRootPaths.1 = EXT:myextension/Resources/Powermail/Layouts/
}
}
page {
@joonassandell
joonassandell / *nix: Install composer to Jelastic etc.
Last active November 3, 2016 09:13
Install Composer to *nix systems (Jelastic, Apache, Nginx)
# Install Composer to Jelastic etc.
If the environment is new, you'll need composer.
1. `cd /var/www/webroot`
2. `curl -sS https://getcomposer.org/installer | php`
3. `mkdir ~/bin`
4. `mv ./composer.phar ~/bin/composer`
After installing, you can add composer to your PATH.
@joonassandell
joonassandell / Random: Commands
Last active September 13, 2016 15:54
Random commands I usually forget
# Curl
**Test origin to a target**:
`curl -i -H "Origin: http://origindomain.com" targetdomain.com`
# SSH
**Show all added keys**:
`ssh-add -l`
@joonassandell
joonassandell / OSX: Commands
Last active November 16, 2018 09:40
Random OSX commands and stuff I usually forget
# Commands
**Show hidden files**:
`defaults write com.apple.Finder AppleShowAllFiles YES`
**Disable photos from auto-opening** (worked in El Capitan, http://bit.ly/2c6rVrX):
`defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool YES`
**Open Hosts**:
`sudo open -t /etc/hosts/`
@joonassandell
joonassandell / Apache: Commands
Last active November 3, 2016 09:14
Random Apache/MySQL commands I usually forget
**Update latest settings and install apache w/ MySQL**:
```
apt-get update
apt-get install apache2
apt-get install php5-mysql
apt-get install php5
apt-get install php5-gd # (if gd needed)
apt-get install mysql-server
```
@joonassandell
joonassandell / *nix: Commands
Last active November 3, 2016 09:13
Random Debian etc. commands I usually forget
**Ubuntu version**:
`lsb_release -a`
**Amount of ram**:
`lshw -C memory`
**Switch to superuser**:
`sudo su`
**Show linux headers**: