Skip to content

Instantly share code, notes, and snippets.

View sagerio's full-sized avatar

sager.io sagerio

View GitHub Profile
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFl4R6UBEADPWy0v3viZjEfkNJkI9umeazvVg+a8ICicPp1Beq/esr8u0HWj
/CD4ebFSA2uAcJemNlQBDQ81j47xSHb6S7YmCJvN5B9iUFHN+wC1rdVjH4RdS/Gt
rtcKP3bJ8vqC+r3Sgqm8xMJPjGA+naKb4x2mVUB3hUt1p/R0qmLvpYMu7d3KiavP
UGRTJldbYoJIGTxxEgU+Y2Pc5g3yEkWVecqcAW6bKEMk4RjrvwBpXVW0F4KYzk1v
b2IJMpluDs81GEAzMMNVeqSWTsIon5GDYkAMZJijxEJd81OXYMTPd5rOfBYwaRZ+
uU8neOnaLZsr6DVQzLR2IpDXuUfUqf7R9GpB4uPBkKycFIMam8pzBz77aGzR94WS
JGOLTvgkPTlzzPWqsbJyoblnBOu3agUFteUGWU9BL3fOIkr914OGJLDEJxzdYRl/
aO4b+tev5VKa9J8+PzxrvGrXCfKnzkS6fx/hMiJmuF31S8EOf95lK8UCSn3mrXX8
.class .intro Selects all elements with class="intro"
.class1.class2 .name1.name2 Selects all elements with both name1 and name2 set within its class attribute
.class1 .class2 .name1 .name2 Selects all elements with name2 that is a descendant of an element with name1
#id #firstname Selects the element with id="firstname"
* * Selects all elements
element p Selects all <p> elements
element.class p.intro Selects all <p> elements with class="intro"
element,element div, p Selects all <div> elements and all <p> elements
element element div p Selects all <p> elements inside <div> elements
element>element div > p Selects all <p> elements where the parent is a <div> element
@sagerio
sagerio / tmux-cheatsheet.markdown
Created February 4, 2020 07:34 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@sagerio
sagerio / git-pushing-multiple.rst
Created November 27, 2019 19:26 — forked from rvl/git-pushing-multiple.rst
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@sagerio
sagerio / git-deployment.md
Created November 20, 2019 13:48 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@sagerio
sagerio / gist:9785ca47e9d252f0ef7537fdd5f6ce77
Created June 3, 2019 11:23 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
<div style="text-align: center;">
  <div style="display: inline-block; text-align: left;">
    Centered<br />
    Content<br />
    That<br />
    Is<br />
    Left<br />
    Aligned
 
<div *ngIf="(user$ | async) as user; else loading">
<user-profile
[user]="user.profile">
</user-profile>
<user-messages
[user]="user.messages">
</user-messages>
</div>
@sagerio
sagerio / angular-form.html
Last active March 2, 2021 11:11
Angular form Example
<div class="container border border-danger">
<form #maria="ngForm">
<input type="text"
class="form-control"
required
[(ngModel)]="test"
name="firstName"
#first="ngModel"
minlength="3"
@sagerio
sagerio / git-commands.md
Last active April 27, 2021 11:23
Git commands

UPDATE GIT (WINDOWS)

$ git update-git-for-windows

CONFIG

$ git config --list --show-origin

LINE ENDING SETTINGS

on Windows: “Checkout Windows-style, commit Unix-style”
Git will convert LF to CRLF when checking out text files. When committing text files, CRLF will be converted to LF. For cross-platform projects, this is the recommended setting on Windows
$ git config --global core.autocrlf true