Skip to content

Instantly share code, notes, and snippets.

View mavisland's full-sized avatar
🤯
overthinking kills your happiness

Tanju Yıldız mavisland

🤯
overthinking kills your happiness
View GitHub Profile
@ssg
ssg / boot.asm
Created August 24, 2010 00:22
My own operating system bootloader
; ESCape Bootstrap-Loader v0.04 beta - (c) 1994 SSG
; This is a bootstrap loader I coded for one of my own "operating system" projects.
; It didn't go much farther than the loader and some init code anyways.
model tiny
.386
cseg segment use16
org 7c00h
@linssen
linssen / the_includes.html
Created May 23, 2012 08:23
Extending the jQuery Sortable With Ajax & MYSQL
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.min.js"></script><link rel='stylesheet' href='styles.css' type='text/css' media='all' />
@s4l1h
s4l1h / Example.php
Created June 15, 2012 09:13
Google Search Class
<?php
header('Content-type: text/html; charset=UTF-8');
include('GoogleSearch.php');
$kelime="Ahmet Kaya";
$google=new GoogleSearch();
$google->setLang("tr");
@gregrickaby
gregrickaby / functions.php
Last active September 26, 2022 04:27
Show me dev info in WordPress
add_action( 'wp_footer', 'wds_debug' );
/*
* Show me some dev info during development! DELETE ME BEFORE GOING LIVE!!!
*
*/
function wds_debug() {
global $template; ?><br />
<?php echo $template; ?><br />
<?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?> seconds<br />
Server load: <?php $load = sys_getloadavg(); echo $load[0]; ?>%<br />
@chuckreynolds
chuckreynolds / wordpress-change-domain-migration.sql
Last active February 10, 2023 18:56
UPDATE: Use WP-CLI find-replace command to edit URLs in your database. https://developer.wordpress.org/cli/commands/search-replace/ Use this SQL script when changing domains on a WordPress site. Whether you’re moving from an old domain to a new domain or you’re changing from a development domain to a production domain this will work. __STEP1: al…
/* Use WP-CLI instead https://developer.wordpress.org/cli/commands/search-replace/ */
SET @oldsite='http://oldsite.com';
SET @newsite='http://newsite.com';
UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite);
UPDATE wp_links SET link_url = replace(link_url, @oldsite, @newsite);
UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite, @newsite);
/* only uncomment next line if you want all your current posts to post to RSS again as new */
@gregrickaby
gregrickaby / page-all.php
Last active November 26, 2018 01:39
Display all posts in a page template
<?php
/**
* Template Name: All Posts
*
* This template lists all posts via WP_Query and get_posts();
*/
get_header();
// WP_Query arguments
$args = array (
@Jan-Bart
Jan-Bart / newLocalSite.sh
Created October 14, 2013 06:57
Create a new local site (on mac os 10.8.5 without MAMP)
#!/bin/bash
# settings
VHOSTSFILE="/private/etc/apache2/extra/httpd-vhosts.conf"
SITEPATH="/Users/USERNAME/Sites/"
# run this as root
read -p "New local site name: " SITE
#/etc/hosts
@rxaviers
rxaviers / gist:7360908
Last active July 23, 2024 21:25
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@ryansechrest
ryansechrest / php-style-guide.md
Last active July 12, 2024 23:44
PHP style guide with coding standards and best practices.

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts