Skip to content

Instantly share code, notes, and snippets.

@diversen
diversen / backup-wordpress-single-file.sh
Last active Jul 5, 2021
Single file wordpress backup script using rsync and mysqldump
View backup-wordpress-single-file.sh
#!/usr/bin/env php
<?php
/**
* Wordpress backup without any configuration
*
* USAGE:
*
* ./wordpress-backup.php path/to/basepath/of/wordpress/
*
@agrcrobles
agrcrobles / android_instructions_29.md
Last active Jul 21, 2021 — forked from patrickhammond/android_instructions.md
Setup Android SDK on OSX with and without the android studio
View android_instructions_29.md

Hi, I am a fork from https://gist.github.com/patrickhammond/4ddbe49a67e5eb1b9c03.

A high level overview for what I need to do to get most of an Android environment setup and maintained on OSX higher Catalina and Big Sur with and without Android Studio been installed.

Considering the SDK is installed under /Users/<your_user>/Library/Android/sdk folder which is the Android Studio preferred SDK location, but it works fine under /usr/local/share/android-sdk as well, which is a location pretty much used on CI mostly.

Prerequisites:

See for brew, python3 and NodeJS on nvm see gist https://gist.github.com/agrcrobles/3d945b165871c355b6f169c317958e3e

@diversen
diversen / phar-composer-usage-example.md
Last active Dec 31, 2016
notes about phar-composer
View phar-composer-usage-example.md

phar-composer example

Create a composer dir called pgit

Create a composer.json file inside this dir containing:

{
    "require": {
        "diversen/minimal-cli-framework": "^1.1"
@soska
soska / index.html
Created Dec 29, 2016 — forked from anonymous/index.html
Musical Chord Progression Arpeggiator
View index.html
<article>
<aside id="aside"></aside>
<main id="main"></main>
</article>
anonymous
anonymous / index.html
Created Dec 29, 2016
Musical Chord Progression Arpeggiator
View index.html
<article>
<aside id="aside"></aside>
<main id="main"></main>
</article>
View test-php-basic-auth.php
<?php
function require_auth() {
$AUTH_USER = 'admin';
$AUTH_PASS = 'admin';
header('Cache-Control: no-cache, must-revalidate, max-age=0');
$has_supplied_credentials = !(empty($_SERVER['PHP_AUTH_USER']) && empty($_SERVER['PHP_AUTH_PW']));
$is_not_authenticated = (
!$has_supplied_credentials ||
$_SERVER['PHP_AUTH_USER'] != $AUTH_USER ||
$_SERVER['PHP_AUTH_PW'] != $AUTH_PASS
@cburgdorf
cburgdorf / xor_keras.py
Last active Nov 18, 2020
Comparing XOR between tensorflow and keras
View xor_keras.py
import numpy as np
from keras.models import Sequential
from keras.layers.core import Activation, Dense
training_data = np.array([[0,0],[0,1],[1,0],[1,1]], "float32")
target_data = np.array([[0],[1],[1],[0]], "float32")
model = Sequential()
model.add(Dense(32, input_dim=2, activation='relu'))
model.add(Dense(1, activation='sigmoid'))
@rajeevkannav
rajeevkannav / pdf2htmlEX.sh
Last active Apr 11, 2020
Install CMake, pkg-config,GNU Getopt,GCC,poppler,fontforge,pdf2htmlEX in Ubuntu 15.05
View pdf2htmlEX.sh
#!/bin/bash
# Ubuntu Developer Script For pdf2htmlEx
# Created by Rajeev Kannav Sharma
# http://rajeevkannav.github.io/
#
#
# Downloads and configures the following:
#
# CMake, pkg-config
# GNU Getopt
@j3j5
j3j5 / gist:8b3e48ccad746b90a54a
Last active Jul 23, 2021
Adyen Test Card Numbers
View gist:8b3e48ccad746b90a54a
Adyen Test Card Numbers
These cards are only valid on our TEST system and they will never involve any actual transaction or transfer of funds. The TEST card numbers will not work on the Adyen LIVE Platform.
For all cards use the following expiration and CVV2/CVC2/or CID for Amex.
For all cards:
Expiration Dates CVV2 / CVC3 CID (American Express)
08/2018 OR 10/2020 737 7373
@jonathanstark
jonathanstark / verify-google-recaptcha-with-php
Last active Mar 29, 2021
Verify Google reCAPTCHA with PHP
View verify-google-recaptcha-with-php
#
# Verify captcha
$post_data = http_build_query(
array(
'secret' => CAPTCHA_SECRET,
'response' => $_POST['g-recaptcha-response'],
'remoteip' => $_SERVER['REMOTE_ADDR']
)
);
$opts = array('http' =>