Skip to content

Instantly share code, notes, and snippets.

View nikescar's full-sized avatar
😁
;)

Woojae Park nikescar

😁
;)
View GitHub Profile
@olucasmac
olucasmac / commands.php
Created March 20, 2018 19:57 — forked from ChgoChad/commands.php
Script to run Mautic (https://mautic.org) commands from a URL.
<?php
if (!isset($_GET['ILoveMautic'])) {
echo 'The secret phrase is wrong.';
die;
}
$link = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$allowedTasks = array(
'cache:clear',
@nrollr
nrollr / nginx.conf
Last active June 9, 2024 23:39
NGINX config for SSL with Let's Encrypt certs
# UPDATED 17 February 2019
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
listen [::]:80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
}
# SSL configuration
@likewhoa
likewhoa / howto
Created September 9, 2016 16:44
code that generates a UEFI capable ISO for Gentoo Linux
$ cat mkefiboot
#!/bin/bash
macbootimg() {
python /usr/lib/python3.3/site-packages/livedvd/mkefiboot -a -l "Gentoo Linux" -i gentoo.icns -p "Gentoo Linux" efi/boot macboot.img
}
efiimg() {
local mountdir
mountdir=$(mktemp -d)
@yvoronoy
yvoronoy / my.cnf
Last active December 22, 2022 17:57
MySQL Magento Config
[mysqld]
## After edit config you have to remove log files and restart mysql server
## because after changing innodb-log-file-size you should recreate ib_logfiles
## Stop MySQL server
## rm /data/dir/ib_logfile*
## Run MySQL server
##Table open cache under MacOS and MySQL 5.6 should be 250.
##Otherwise you will get error MySQL server has gone away
##table-open-cache = 250
#!/usr/bin/env bash
# Names of latest versions of each package
export VERSION_PCRE=pcre-8.39
export VERSION_ZLIB=zlib-1.2.8
export VERSION_LIBRESSL=libressl-2.4.2
export VERSION_NGINX=nginx-1.11.3
# URLs to the source directories
export SOURCE_LIBRESSL=http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/
@rmehta
rmehta / erpnext_magento.php
Last active April 24, 2024 06:57
Sample ERPNext Magento Connector
<?php
// contributed by supplify.com
error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once '../curl/Zebra_cURL.php';
require_once '../app/Mage.php';
Mage::app();
class action extends Zebra_cURL{
@MarQuisKnox
MarQuisKnox / xmpp.php
Created June 22, 2015 13:07
Send XMPP Messages using PHP
<?php
error_reporting( E_ALL & ~E_STRICT );
ini_set( 'display_errors', true );
$path = dirname( __FILE__ ).'/library';
set_include_path(
get_include_path() . PATH_SEPARATOR . $path
);
@escopecz
escopecz / gist:931ad49f741b6af75cb6
Last active June 29, 2020 00:17
Mautic API integration tutorial for PHP

Mautic has API to interact with other systems. There is PHP API library for faster integration to PHP projects.

Install Mautic API library with Composer

API library isn't at Packagist in time of writing this article. Good chance is the library is at Packagist in time of reading, so install it from there and skip this.

Install from GitHub repo. So to use the library as Composer package from GitHub repo your composer.json should contain:

...
@KhepryQuixote
KhepryQuixote / PyTorStemPrivoxy.md
Last active September 9, 2023 20:36
Python script to connect to Tor via Stem and Privoxy, requesting a new connection (hence a new IP as well) as desired.

Crawling Anonymously with Tor in Python

adapted from the article "Crawling anonymously with Tor in Python" by S. Acharya, Nov 2, 2013.

The most common use-case is to be able to hide one's identity using TOR or being able to change identities programmatically, for example when you are crawling a website like Google and you don’t want to be rate-limited or blocked via IP address.

Tor

Install Tor.

@carlosfunk
carlosfunk / install_python.ps1
Last active June 13, 2023 04:57
Powershell scripts for setting up a Python environment under Windows
# To run this file you will need to open Powershell as administrator and first run:
# Set-ExecutionPolicy Unrestricted
# Then source this script by running:
# . .\install_python.ps1
$save_dir=Resolve-Path ~/Downloads
$project_dir = "C:\Projects"
$virtualenv_dir = $project_dir + "\virtualenvs"
$client = New-Object System.Net.WebClient