Skip to content

Instantly share code, notes, and snippets.

@signsi
signsi / vertical.scss
Last active October 2, 2017 08:49
[Vertical Centering] #css #layout
position: relative;
margin-top: 50%;
transform: translateY(-50%);
/* Mixin --> not tested */
@mixin vertical-align($position: relative) {
position: $position;
top: 50%;
-webkit-transform: translateY(-50%);
@signsi
signsi / loop.php
Created August 24, 2017 08:33
[Show content of static blog page] #php #wordpress
<?php
global $post;
$page_for_posts_id = get_option( 'page_for_posts' );
if ( $page_for_posts_id ) :
$post = get_page( $page_for_posts_id );
setup_postdata( $post );
?>
<div id="post-<?php the_ID(); ?>">
<header>
<h1><?php the_title(); ?></h1>
@signsi
signsi / must-haves.txt
Last active October 2, 2017 08:48
MUST-HAVES
SDKMAN! (The Software Development Kit Manager)
Atom
https://robomongo.org
Termius
@signsi
signsi / key.sh
Last active October 2, 2017 08:48
Get SSH Public Key #mac #terminal #ssh
pbcopy < ~/.ssh/id_rsa.pub
@signsi
signsi / ssh.sh
Created September 1, 2017 16:14
Enable SSH-Login #ssh #terminal #ubuntu
ssh-copy-id -i ~/.ssh/id_rsa.pub user@host
@signsi
signsi / shell.sh
Last active October 2, 2017 08:48
Sudo with SSH #ssh #ubuntu
visudo /etc/sudoers
user ALL=(ALL) NOPASSWD: ALL
@signsi
signsi / sh.sh
Created September 1, 2017 17:40
Ubuntu Search Filename #ubuntu #shell
find / -name logstash
@signsi
signsi / services.sh
Created September 3, 2017 19:33
Show all running services #ubuntu #terminal
service --status-all
@signsi
signsi / vi.sh
Created September 3, 2017 19:53
Empty whole file #vim #terminal #ubuntu
:1,$d
@signsi
signsi / r-redis.r
Last active October 2, 2017 08:46
R-Redis #redis #r
library("rredis")
redisConnect()
redisSet("key","value")
redisGet("key")