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
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active September 7, 2026 19:01
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@digitaljhelms
digitaljhelms / gist:4287848
Last active July 22, 2026 04:49
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@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,
@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">

Git Cheat Sheet

Commands

Getting Started

git init

or

@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
@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;
}
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active August 12, 2026 20:00
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@AustinGil
AustinGil / functions.php
Last active September 14, 2020 11:56
JSON-LD for WordPress posts
/**
* Remove hentry from post_class
* This is important to not get schema errors
*/
function visceral_remove_hentry_class( $classes ) {
$classes = array_diff( $classes, array( 'hentry' ) );
return $classes;
}
add_filter( 'post_class', 'visceral_remove_hentry_class' );
@sserbest
sserbest / index.html
Created June 26, 2017 02:07
Infinite scroll with scrollspy
<div class="uk-container uk-container-center" style="min-height:600px">
<h1>Infinite list</h1>
<ul class="uk-list uk-list-line" id="infinite-list"></ul>
<div id="scrollspy" data-uk-scrollspy="{topoffset: 200, repeat: true}" class="uk-text-center">
<i class="uk-icon-refresh uk-icon-spin uk-hidden"></i>
</div>
<script type="text/listtemplate">