Skip to content

Instantly share code, notes, and snippets.

# VSFTPD installation for ubuntu
#
sudo su
apt-get update
apt-get install vsftpd
useradd -m ftpusr
# add your groups where nessesary
service vsftpd restart
@codebymark
codebymark / recaptcha_helper.php
Last active January 10, 2024 04:49
Google Recaptcha v3 Helper for CodeIgniter 3
<?php if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Google ReCAPTURE v3 Helper
* @docs https://developers.google.com/recaptcha/docs/v3
*
* INSTALLATION INSTRUCTIONS
* 1. Register account and website with Google Recaptcha to receive a Site Key and Secret Key - https://www.google.com/recaptcha/admin
NOTE: Ensure you select reCAPTCHA v3 .. NOT .. reCAPTCHA v2
sudo su
dd if=/dev/zero of=/swapfile bs=1M count=2000
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
swapon -s
nano /etc/fstab
Add this text to the bottom:
@codebymark
codebymark / grunticon.directive.ts
Last active July 19, 2019 06:11
grunticon angular
import {Directive, ElementRef, Renderer2, AfterViewInit} from '@angular/core';
declare let window: CustomWindow;
@Directive({
selector: '[appGrunticonEmbeded]'
})
export class GrunticonDirective implements AfterViewInit {
constructor(private element: ElementRef, private renderer: Renderer2) {}
@codebymark
codebymark / config.yml
Last active July 15, 2019 05:48
Circle Ci Sample Config: two jobs, one for a master build (latest) and one for a stable release. Using workflows to add branch filters
version: 2
jobs:
build:
docker:
- image: circleci/node:10.13.0
steps:
- checkout
- run:
name: Install dependencies
command: npm install
@codebymark
codebymark / .htaccess
Created November 6, 2018 21:58
Handy htaccess - Force www and HTTPS + IP address block/redirect
# A collection of handy features
# Mark Bucknell <markbucknellcc@gmail.com>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# IP address block/redirect
# If your ip address is not in this list then redirect to the maintenance page
#Options +FollowSymlinks