Skip to content

Instantly share code, notes, and snippets.

View Sonichaos360's full-sized avatar

Luciano Joan Vergara Sonichaos360

View GitHub Profile
@Greg-Boggs
Greg-Boggs / purge_cf.php
Last active August 7, 2023 09:23
PHP code to Purge Cloudflare Cache
<?php
// Replace EMAIL/API_KEY/ZONE_ID with your details.
// Zone ID is on the dashboard for the domain in the bottom right.
// Api keys are generated from the account settings. You must give cache purge permissions
// Place this script on your webserver and point a Github Webhook at it, and you'll clear
// the Cloudflare cache every time you do a push to GH.
$zoneId = "xxx";
$apiKey = "xxx";
$email = "xxx";
@noelboss
noelboss / git-deployment.md
Last active April 25, 2024 10:38
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.

@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active April 15, 2024 02:19
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

From terminal:
1: yum install epel*
2: yum update / yum upgrade
3: Add repo source
- CentOS and Red Hat Enterprise Linux 6.x
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm
@Toddses
Toddses / iis-web.config
Last active July 14, 2023 04:29
Example web.config for WordPress on IIS
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<clear />
<add value="index.php" />
</files>
</defaultDocument>
<rewrite>
@stormwild
stormwild / sql_safe_updates
Last active February 6, 2024 23:52
How to disable MySQL Safe Mode
UPDATE table_name SET bDeleted=0 WHERE name='xyz';
“You are using safe update mode and you tried to update a table without a WHERE clause that uses a KEY column.”
SET SQL_SAFE_UPDATES=0;
UPDATE table_name SET bDeleted=0 WHERE name='xyz';
SET SQL_SAFE_UPDATES=1;
#http://www.xpertdeveloper.com/2011/10/mysql-safe-update/
@edwardtoday
edwardtoday / gist:2204864
Created March 26, 2012 12:54
PhoneGap sqlite working example
Hi
I hope this helps you all get started with phonegap and sqlite in your
application
Dean-O
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>