Skip to content

Instantly share code, notes, and snippets.

View sserbest's full-sized avatar
💭
I may be slow to respond.

Serkan Serbest sserbest

💭
I may be slow to respond.
View GitHub Profile
@mattclements
mattclements / function.php
Last active May 11, 2026 01:04
Wordpress Disable Comments (add to function.php)
<?php
add_action('admin_init', function () {
// Redirect any user trying to access comments page
global $pagenow;
if ($pagenow === 'edit-comments.php') {
wp_redirect(admin_url());
exit;
}
@irazasyed
irazasyed / manage-etc-hosts.sh
Created March 7, 2015 09:16
Bash Script to Manage /etc/hosts file for adding/removing hostnames.
#!/bin/sh
# PATH TO YOUR HOSTS FILE
ETC_HOSTS=/etc/hosts
# DEFAULT IP FOR HOSTNAME
IP="127.0.0.1"
# Hostname to add/remove.
HOSTNAME=$1

Git Cheat Sheet

Commands

Getting Started

git init

or

@bennadel
bennadel / lazy-loading-images.htm
Created July 23, 2013 13:04
Lazy Loading Image With AngularJS
<!doctype html>
<html ng-app="Demo" ng-controller="AppController">
<head>
<meta charset="utf-8" />
<title>
Lazy Loading Images With AngularJS
</title>
<style type="text/css">
@Partoo
Partoo / image.js
Created April 18, 2013 14:42
ckeditor plugin image.js
/**
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function() {
var imageDialog = function( editor, dialogType ) {
// Load image preview.
var IMAGE = 1,
LINK = 2,
@digitaljhelms
digitaljhelms / gist:4287848
Last active May 9, 2026 23:10
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 12, 2026 07:16
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname