Skip to content

Instantly share code, notes, and snippets.

@arshidkv12
arshidkv12 / clean.js
Created October 23, 2018 06:02
clean react native cache
function rn-clean() {
watchman watch-del-all
rm -rf $TMPDIR/react-*
rm -rf $TMPDIR/haste-*
rm -rf $TMPDIR/metro-*
npm start -- --reset-cache
}
@arshidkv12
arshidkv12 / example-wp-list-table.php
Created March 16, 2017 21:49 — forked from paulund/example-wp-list-table.php
An example code of using the WP_List_Table class. With Pagination.
<?php
/*
* Plugin Name: Paulund WP List Table Example
* Description: An example of how to use the WP_List_Table class to display data in your WordPress Admin area
* Plugin URI: http://www.paulund.co.uk
* Author: Paul Underwood
* Author URI: http://www.paulund.co.uk
* Version: 1.0
* License: GPL2
*/
@tivnet
tivnet / apigen-hooks.php
Created November 2, 2016 17:58
Generate list of hooks (for WPGlobus)
<?php
/**
* File: apigen-hooks.php
*
* NOTE: this code is used internally in WPGlobus project.
* It's a W.I.P. - please use it, but do not forget to adapt for your project.
*
* @package WPGlobus\APIGen
* @author Gregory Karpinsky (@tivnet)
*/
@indiesquidge
indiesquidge / express-example.md
Last active November 1, 2023 10:29
Custom port on Express.js

Express.js Example

Setup

This code is a direct copy of the code found on the Express.js site under Getting Started. I just followed installing and hello world from there to get a basic server up and running.

(index.js file)

@teledirigido
teledirigido / import_files.php
Created July 6, 2015 01:44
Create post, add attachment and update field via ACF
<?php
/*
*
* This small scripts creates a post and attaches a file using Advanced custom field.
*
* Created by Miguel Garrido
* miguel.co.nz | miguel@blacksheepdesign.co.nz
*
* Notes:
@handrus
handrus / php_zip.inc
Created April 11, 2012 16:27
Zip files on php without ZIP library
<?php
// $Id$
/**
* @file
* Zip class for servers without ziplib.
*/
class PHPZip {
function Zip($dir, $zipfilename) {
if (@function_exists('gzcompress')) {