Skip to content

Instantly share code, notes, and snippets.

View crishnakh's full-sized avatar
💻
Ey! Listen!

Francisco Gálvez crishnakh

💻
Ey! Listen!
View GitHub Profile
@aaronmdjones
aaronmdjones / freenode-resign-letter.txt
Created May 19, 2021 10:20
My resignation from freenode
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
My resignation from freenode staff
==================================
I joined the freenode staff in March 2019 [1].
Before I joined the staff, Freenode Ltd was sold [2] to a person named
Andrew Lee as part of a sponsorship deal. The informal terms of that
@hasn-prevas
hasn-prevas / add-bom.sh
Last active May 22, 2023 02:07
Shell script to add UTF-8 BOM to any file
#!/bin/sh
BOM='\xEF\xBB\xBF'
if ! sed -n "1{/^$BOM/q1}" "$1"; then
echo "Already has BOM" >&2
exit 1
fi
sed -i "1s/^/$BOM/" "$1"
@pierrejoubert73
pierrejoubert73 / psql-import-db-dump.md
Last active June 14, 2024 17:24
How to import a dump file in PSQL.

Open terminal.

Connect to psql:

psql -p 5433

I find it easier to delete and recreate the DB to which you want to import. So ensure the databse you want to delete is listed:

\l

@stormwild
stormwild / woocommerce-create-order.md
Last active November 5, 2023 01:40
WooCommerce Creating Order Programmatically

WooCommerce Creating Order Programmatically

WooCommerce Create Order

creating Woocommerce order with line_item programatically

// http://stackoverflow.com/questions/26581467/creating-woocommerce-order-with-line-item-programatically
$address = array(
            'first_name' => 'Fresher',
@Jarvvski
Jarvvski / issue.php
Last active June 25, 2020 11:35
How to create a Github issue using the API within PHP
// $Token = personal access token for the account that will post the issue
$headerValue = " Bearer " . $token;
// Format the curl heaer (-H) with our auth code
$header = array("Authorization:" . $headerValue);
// Content for the issue
$title = "I have a problem";
$body = "I broke it, how can i fix it?";
@devluis
devluis / horizontal-responsive-multilevel-menu.html
Last active June 9, 2021 14:38
Responsive Multilevel Horizontal Menu only with CSS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Responsive Multilevel Horizontal Menu</title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
<style>
#menu ul {
margin: 0;
padding: 0;
@tivnet
tivnet / woocommerce_category_list.sql
Created May 29, 2014 03:22
WooCommerce category list SQL query
--
-- @author Gregory Karpinsky, http://www.tiv.net/
-- @version 14.05.28
--
SELECT
tp.name Cat,
t.name Subcat
FROM
wp_term_taxonomy tt,
wp_terms t,
<?php
add_action( 'after_setup_theme', 'bootstrap_setup' );
if ( ! function_exists( 'bootstrap_setup' ) ):
function bootstrap_setup(){
add_action( 'init', 'register_menu' );
@martinrusev
martinrusev / imap-search
Last active March 22, 2024 06:50
IMAP Search criteria