Skip to content

Instantly share code, notes, and snippets.

View nickeforsberg's full-sized avatar
💻
Focusing

Nicke Forsberg nickeforsberg

💻
Focusing
View GitHub Profile
@noelboss
noelboss / git-deployment.md
Last active May 9, 2025 12:51
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.

@ajuliano
ajuliano / polylang och ACF Options Page
Last active September 19, 2018 14:42
polylang och ACF Options Page
/*
* Få Polylang och ACF Options Page att fungera
*
* http://www.advancedcustomfields.com/resources/multilingual-custom-fields/ (Längst ned på sidan)
*/
add_filter('acf/settings/default_language', function( $language ) {
if ( function_exists( 'pll_current_language' ) ) {
@BronsonQuick
BronsonQuick / wp_cli_command_to_delete_all_woocommerce_users
Created April 16, 2015 04:32
WP-CLI command to delete all WooCommerce users
wp user list --field=ID --role=customer | xargs wp user delete --yes
@nichtich
nichtich / README.md
Last active February 20, 2025 12:34 — forked from oodavid/README.md
How to automatically deploy from GitHub

Deploy your site with git

This gist assumes:

  • you have an online remote repository (github / bitbucket etc.)
  • you have a local git repo
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by Apache
  • the Apache user is named www-data (may be apache on other systems)
@ghalimi
ghalimi / NOMINAL.js
Created January 23, 2013 22:07
NOMINAL
// Copyright (c) 2012 Sutoiku, Inc. (MIT License)
function NOMINAL(rate, periods) {
// Return error if any of the parameters is not a number
if (isNaN(rate) || isNaN(periods)) return '#VALUE!';
// Return error if rate <=0 or periods < 1
if (rate <=0 || periods < 1) return '#NUM!';
// Truncate periods if it is not an integer
@oodavid
oodavid / README.md
Last active March 11, 2025 21:41 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/