Skip to content

Instantly share code, notes, and snippets.

View Martin-Eckleben's full-sized avatar

Martin Eckleben Martin-Eckleben

View GitHub Profile
@kinoli
kinoli / autoresize.ts
Created September 13, 2017 22:14
Auto resize directive for TextAreas in Angular 2/4
// An autoresize directive that works with ion-textarea in Ionic 2
// Usage example: <ion-textarea autoresize [(ngModel)]="body"></ion-textarea>
// Usage example: <ion-textarea autoresize="100" [(ngModel)]="body"></ion-textarea>
// Based on https://www.npmjs.com/package/angular2-autosize
import { Directive, HostListener, ElementRef, Input } from "@angular/core";
@Directive({
selector: "ion-textarea[autoresize]" // Attribute selector
})
@hofmannsven
hofmannsven / README.md
Last active June 6, 2023 18:01
Add WordPress admin menu pages with another Dashicon. (Note: This will require at least WordPress 3.8)
@thoop
thoop / nginx.conf
Last active December 8, 2023 21:55
Official prerender.io nginx.conf for nginx
# Change YOUR_TOKEN to your prerender token
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
server_name example.com;
root /path/to/your/root;
index index.html;
@jessedearing
jessedearing / gist:2351836
Created April 10, 2012 14:44 — forked from twoism-dev/gist:1183437
Create self-signed SSL certificate for Nginx
#!/bin/bash
echo "Generating an SSL private key to sign your certificate..."
openssl genrsa -des3 -out myssl.key 1024
echo "Generating a Certificate Signing Request..."
openssl req -new -key myssl.key -out myssl.csr
echo "Removing passphrase from key (for nginx)..."
cp myssl.key myssl.key.org
openssl rsa -in myssl.key.org -out myssl.key