Skip to content

Instantly share code, notes, and snippets.

View ajitbohra's full-sized avatar
🎯
Scaling Operations @lubusIN

Ajit Bohra ajitbohra

🎯
Scaling Operations @lubusIN
View GitHub Profile
@yano3
yano3 / gist:1378948
Created November 19, 2011 15:17
git commit --amend --reset-author
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:
git config --global user.name "Your Name"
git config --global user.email you@example.com
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
@tsabat
tsabat / zsh.md
Last active December 25, 2023 19:16
Getting oh-my-zsh to work in Ubuntu
@jo-snips
jo-snips / page-random-event.php
Created March 9, 2012 02:44 — forked from jkudish/page-random-event.php
The Events Calendar: This is an example of a query which gets a single random event from the 'featured' event category amongst events from The Events Calendar
<?php
/**
* This is an example of a query which gets a single random event from the
* 'featured' event category amongsts evetns from The Events Calendar
*
* @see http://tri.be/support/forums/topic/random-featured-event-custom-widget/
*/
get_header();
@hinnerk-a
hinnerk-a / wp_log_http_requests.php
Created May 31, 2012 20:31
WordPress filter hook for logging WP HTTP requests
<?php
function wp_log_http_requests( $response, $args, $url ) {
// set your log file location here
$logfile = plugin_dir_path( __FILE__ ) . '/http_requests.log';
// parse request and response body to a hash for human readable log output
$log_response = $response;
if ( isset( $args['body'] ) ) {
@ksafranski
ksafranski / Common-Currency.json
Last active June 3, 2024 04:02
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
@ScottPhillips
ScottPhillips / wordpress-fetch-rss-feed.php
Created July 29, 2012 20:11
Fetch RSS Feed in WordPress
<?php
include_once(ABSPATH . WPINC . '/feed.php');
if(function_exists('fetch_feed')) {
$feed = fetch_feed('http://example.com/feed/');
if (!is_wp_error($feed)) : $feed->init();
$feed->set_output_encoding('UTF-8'); // set encoding
$feed->handle_content_type(); // ensure encoding
$feed->set_cache_duration(21600); // six hours in seconds
@vindia
vindia / droplet.css
Created August 13, 2012 12:13
CSS 3 Water Droplet
body { padding: 4em; }
#droplet {
background-color: lightblue;
width: 150px;
height: 150px;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 75px;
-webkit-border-bottom-right-radius: 75px;
-webkit-border-bottom-left-radius: 75px;
-webkit-transform:rotate(45deg);
@kasparsd
kasparsd / wordpress-plugin-svn-to-git.md
Last active April 17, 2024 12:35
Using Git with Subversion Mirroring for WordPress Plugin Development
@DavidWells
DavidWells / add-wordpress-settings-page.php
Created January 28, 2013 05:59
WordPress :: Add Settings Page with All Fields
<?php
/*
Plugin Name: Homepage Settings for BigBang
Plugin URI: http://www.inboundnow.com/
Description: Adds additional functionality to the big bang theme.
Author: David Wells
Author URI: http://www.inboundnow.com
*/
// Specify Hooks/Filters
@bigdawggi
bigdawggi / mailtrap-filter.php
Last active June 3, 2019 19:11
Mailtrap filter for WordPress
/**
* Routes all email from WP installation to specific Mailtrap
* account inbox.
*
* All you need to do is change the "Username" and "Password"
* settings to the appropriate box in Mailtrap. Then all
* mail **should** be routed to that box. Exceptions would
* be other functionality that overwrite the wp_mail() functions
* and may not use this filter, or other filters that change
* this behavior after we set it, or millions of other things.