Skip to content

Instantly share code, notes, and snippets.

@jakebellacera
jakebellacera / ICS.php
Last active July 10, 2024 11:27
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
@oodavid
oodavid / README.md
Last active June 12, 2024 00:28 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@maccath
maccath / gist:3981205
Created October 30, 2012 16:09
Split PDF to individual pages using FPDI and FPDF
<?php
/**
* Split PDF file
*
* <p>Split all of the pages from a larger PDF files into
* single-page PDF files.</p>
*
* @package FPDF required http://www.fpdf.org/
* @package FPDI required http://www.setasign.de/products/pdf-php-solutions/fpdi/
@walkerjeffd
walkerjeffd / Synology-Diskstation-Git.md
Last active July 17, 2024 08:15
Instructions for setting up git server on Synology Diskstation

Configure Synology NAS as Git Server

Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.

Set Up User and Folder

  • Create user gituser via Diskstation interface (with File Station and WebDAV privilages)
  • Add new shared folder called git (located at /volume1/git) with read/write access for gituser and admin. This folder will hold all the repos.
  • Install Git Server package via Diskstation
% 1. Title: Iris Plants Database
%
% 2. Sources:
% (a) Creator: R.A. Fisher
% (b) Donor: Michael Marshall (MARSHALL%PLU@io.arc.nasa.gov)
% (c) Date: July, 1988
%
% 3. Past Usage:
% - Publications: too many to mention!!! Here are a few.
% 1. Fisher,R.A. "The use of multiple measurements in taxonomic problems"
@justinbellamy
justinbellamy / cltools.sh
Last active March 6, 2022 03:46 — forked from jellybeansoup/cltools.sh
Install Autoconf and Automake on OS X El Capitan
#!/bin/sh
##
# Install autoconf, automake and libtool smoothly on Mac OS X.
# Newer versions of these libraries are available and may work better on OS X
#
# This script is originally from http://jsdelfino.blogspot.com.au/2012/08/autoconf-and-automake-on-mac-os-x.html
#
export build=~/devtools # or wherever you'd like to build
@jbeales
jbeales / usps-abbreviations.php
Last active June 21, 2024 19:04
The official USPS abbreviations used in City & Street names, as a PHP array.
<?php
// based on: http://pe.usps.gov/text/pub28/28apc_002.htm
$usps_abbreviations = [
'ALLEY' => 'ALY',
'ANNEX' => 'ANX',
'ARCADE' => 'ARC',
'AVENUE' => 'AVE',
'BAYOO' => 'BYU',
'BEACH' => 'BCH',
@kekru
kekru / Docker connect to remote server.md
Last active June 14, 2024 09:00
Connect to another host with your docker client, without modifying your local Docker installation

Run commands on remote Docker host

This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.

Enable Docker Remote API

First be sure to enable the Docker Remote API on the remote host.

This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.

@lalogrosz
lalogrosz / ucwords.ts
Created August 11, 2017 16:41
Angular ucwords Pipe
import { Injectable, Pipe } from '@angular/core';
@Pipe({
name: 'ucwords'
})
@Injectable()
export class UcwordsPipe {
/*
Takes a value and makes it lowercase.
*/
@Sulkar
Sulkar / non-blockingTkinter.py
Created August 12, 2017 20:15
[python] non-blocking Tkinter thats uses .update_idletasks()
#
# non blocking Tkinter code -> uses of .update_idletasks()
#
import time
from tkinter import *
# Function: with timeout
def mySleep():
text.insert(INSERT, "start sleep\n")