Skip to content

Instantly share code, notes, and snippets.

View ben-burlingham's full-sized avatar

Ben Burlingham ben-burlingham

View GitHub Profile
@nimbupani
nimbupani / index.html
Created December 2, 2011 05:00
Showing latest post on home page with Jekyll
---
layout: default
---
<div class="blog-index">
{% assign post = site.posts.first %}
{% assign content = post.content %}
{% include post_detail.html %}
</div>
@RainerAtSpirit
RainerAtSpirit / JekyllApps.js
Created July 9, 2012 12:18
Adding AngularJS search in Jekyll blog
/**
* Setup Module with `highlight` filter
*/
var JekyllApp = angular.module('JekyllApp', [], function ($routeProvider, $locationProvider) {
$locationProvider.html5Mode(false);
});
JekyllApp.filter('highlight', function () {
return function (text, filter) {
@thomseddon
thomseddon / gist:3511330
Last active March 8, 2023 03:39
AngularJS byte format filter
app.filter('bytes', function() {
return function(bytes, precision) {
if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) return '-';
if (typeof precision === 'undefined') precision = 1;
var units = ['bytes', 'kB', 'MB', 'GB', 'TB', 'PB'],
number = Math.floor(Math.log(bytes) / Math.log(1024));
return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) + ' ' + units[number];
}
});
@andrewspear
andrewspear / social_counts.inc.php
Last active November 2, 2018 19:50
Count your Facebook followers, Twitter followers, Google+ followers, LinkedIn group followers, Constant Contact subscribers, YouTube subscribers, YouTube channel views.
<?
/*
$facebook_followers = social_count('facebook', array(
'id' => '<your_facebook_page_name_or_id>',
'api_key' => '<your_facebook_app_api_key>',
'api_secret' => '<your_facebook_app_api_secret>'
));
@sergeyt
sergeyt / gogs.conf
Created October 17, 2014 17:04
gogs upstart script
#
# upstart script for gogs (Go Git Service)
#
author "tsv"
description "gogs upstart script"
start on (local-filesystems and net-device-up)
stop on shutdown
@jiggneshhgohel
jiggneshhgohel / ssh_config.md
Last active September 8, 2022 00:28
Windows 10 Linux Subsystem SSH-agent issues
Host github.com-jiggneshhgohel
HostName github.com
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_work_gmail
AddKeysToAgent yes


Host csexperimental.abc.com
@shortjared
shortjared / list.txt
Last active July 19, 2024 21:20
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com