Skip to content

Instantly share code, notes, and snippets.

View davebeach's full-sized avatar

David Beach davebeach

View GitHub Profile
@davebeach
davebeach / terms.md
Created June 1, 2017 16:16
Sample Terms and Conditions

Terms Of Use

Table of Contents

  1. Legal Notices
  2. Permitted and Prohibited Uses
  3. User Submissions
  4. User Discussion Lists and Forums
  5. Use of Personally Identifiable Information
  6. Indemnification
@davebeach
davebeach / NewUserRegisterForm.php
Created June 1, 2017 07:52 — forked from davidDuymelinck/NewUserRegisterForm.php
Extend drupal 8 user register form
<?php
namespace Drupal\my_module\Form;
use Drupal\Component\Datetime\TimeInterface;
use Drupal\Core\Entity\EntityFormBuilderInterface;
use Drupal\Core\Entity\EntityManagerInterface;
use Drupal\Core\Entity\EntityTypeBundleInfoInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
@davebeach
davebeach / drupal-8-security-permissions.md
Last active March 24, 2021 17:25
Drupal 8.0 Security Settings

Drupal 8 Securing Production Environment

Permissions

sudo chown -R MYUSER:www-data *
sudo find . -type d -exec chmod 755 {} \;
sudo find . -type f -exec chmod 640 {} \;
sudo find sites/default/files/config* -type f -exec chmod 664 {} \;
@davebeach
davebeach / bitnami.md
Last active May 26, 2020 17:10
Bitnami Applications Useful LINUX Commands

User Management

  • First on debian 8 system (bitnami) sudo apt-get update

  • Next install ZSH with SUDO sudo apt-get install zsh

  • You will get the message about file size, select Y: After this operation 13.2 MB of additional disk space will be used.

@davebeach
davebeach / terminal.md
Last active April 13, 2019 12:51
Mac OS X Useful Terminal Commands

File Management

  • Show or hide hidden files AppleShowAllFiles YES. Don't forget to refresh finder. Option+Finder Icon

  • To remove the quarantine status of a new file on mac (as it causes problems with keys etc) xattr -d com.apple.quarantine filename.pem FILE

  • to remove from all computers quarenteen files (warning as may be too large to attempt if you download a lot, and or recently) find . | xargs xattr -d com.apple.quarantine

  • to clear att xattr:

@davebeach
davebeach / .gitconfig
Created June 13, 2018 23:37
my .gitconfig
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[core]
excludesfile = /Users/davidbeach/.gitignore_global
editor = subl -n -w
autocrlf = input
[difftool "sourcetree"]
@davebeach
davebeach / xs2xscli.txt
Created June 6, 2018 21:33 — forked from paschmann/xs2xscli.txt
SAP HANA XS Adanced (XS2) CLI Commands
GETTING STARTED:
login, l Log user in
logout Log user out
target, t Set or view the targeted org or space
api Set or view target api url
APPS:
apps, a List all apps in the target space
app Display the status and information about an app
@davebeach
davebeach / googlesheetsjson.js
Last active June 4, 2018 13:28 — forked from mhawksey/gist:1442370
google sheets script to pull json file into google sheets.
function getJSON(aUrl,sheetname) {
//var sheetname = "test";
//var aUrl = "https://drive.google.com/open?id=1_aSak09jFHtsTaItqh9FmEIeIUPynFWd";
var response = UrlFetchApp.fetch(aUrl); // get feed
var dataAll = JSON.parse(response.getContentText()); //
var data = dataAll.value.items;
for (i in data){
data[i].pubDate = new Date(data[i].pubDate);
data[i].start = data[i].pubDate;
}
@davebeach
davebeach / ssh-macos-hana-express.md
Last active June 3, 2018 01:53
To Connect to Your HANA Express Server MACOS

HANA Express Server

Connect to HANA Express Server (HANA XS/XSA)

Purpose

The SAP instructions don't always have the macos instructions. This is pretty standard on the macos side, but if unable to connect SSH to the HANA server, please read below.

Use Case

You need to pull files from the HANA Express Server

Verify Existing Keys Exist

@davebeach
davebeach / .gitignore
Created March 29, 2018 04:07
Exclude Confidential Files to Be sent to git
#####################
# AWS CLI credential blobs
#####################
.aws/credentials
aws/credentials
homefolder/aws/credentials
#####################
# Private RSA SSH keys
#####################