Skip to content

Instantly share code, notes, and snippets.

View philippgerbig's full-sized avatar
🏠
Working from home

Philipp Gerbig philippgerbig

🏠
Working from home
View GitHub Profile
@philippgerbig
philippgerbig / social-sharing-urls.md
Created September 16, 2020 11:14
Social Sharing URLs

Facebook http://www.facebook.com/sharer/sharer.php?u={{URL}}

Twitter https://twitter.com/share?text={{OPTIONAL_TEXT}}&url={{URL}}

XING https://www.xing.com/spi/shares/new?url={{URL}}

LinkedIn

# weiterleitung zu ssl
server {
listen 80;
listen [::]:80;
server_name subdomain.domain.de;
return 301 https://$server_name$request_uri;
}
# eigentliche port weiterleitung
server {
email.replace(/[a-z]{4}/g,'****')}

Wichtige Metadaten für Social Medias:

Bildgröße

Verwende Bilder mit mindestens 1200 x 630 Pixel für die beste Anzeige auf hochauflösenden Geräten. Du solltest zumindest Bilder mit 600 x 315 Pixel verwenden, um Linkseitenbeiträge mit größeren Bildern anzuzeigen. Bilder können bis zu 8 MB groß sein. Quelle: https://developers.facebook.com/docs/sharing/best-practices/

Google Plus:

<link rel="publisher" href="{{URL ZUR GOOGLE + SEITE}}"/>

Facebok:

Keybase proof

I hereby claim:

  • I am philippgerbig on github.
  • I am philippgerbig (https://keybase.io/philippgerbig) on keybase.
  • I have a public key ASDS5fEOVwU8SRJI4iRIbZS5dYEmU4q4mihvfGg3XSNnFwo

To claim this, I am signing this object:

@philippgerbig
philippgerbig / getMouseTouchPointPosition.js
Created December 7, 2016 08:13
get touch point position
function getMouseTouchPointPosition( e ) {
var result = {
x : 0,
y : 0
};
if (e.originalEvent.touches) {
var touches = e.originalEvent.touches;
if (touches.length > 0) {
result.x = touches[0].pageX;
@philippgerbig
philippgerbig / .bash_profile
Created October 28, 2016 06:23
Open XCode iOS Simulator via terminal
alias isim='open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app'
@philippgerbig
philippgerbig / README.md
Last active October 21, 2016 11:52
OSX MongoDB start shell script

Please replace the paths with your choses.

Then place the file in /usr/local/bin

You can rename it to start-mongo (without extension .sh) to use it only like this: $ start-mongo

@philippgerbig
philippgerbig / index.js
Last active September 30, 2016 20:33
Generator function example with co and ajax request
import fetch from 'node-fetch';
// for use in browser you need to import fetch from fetch-polyfill
import co from 'co';
co(function *() {
const url = 'http://jsonplaceholder.typicode.com/posts/i';
const response = yield fetch(url);
const post = yield response.json();
const { title } = post;
@philippgerbig
philippgerbig / ec
Last active September 30, 2016 06:33
Useful Intellij / PHPStorm live templates
// export constant
export const $V$ = '$V$';