This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.
— Erik
// Sets the view's background to the given image | |
// prior to call, you may need to execute: `view.wantsLayer = YES` | |
void SetBackgroundImage(NSView *view, NSString *imageName) | |
{ | |
view.layer.contents = (id)[NSImage imageNamed:imageName]; | |
} |
############################################################################### | |
## Monit control file | |
############################################################################### | |
## | |
## Comments begin with a '#' and extend through the end of the line. Keywords | |
## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'. | |
## | |
## Below you will find examples of some frequently used statements. For | |
## information about the control file, a complete list of statements and | |
## options please have a look in the monit manual. |
# Script to delete all but a specified list of tags | |
# from a git repo, both locally and remotely | |
# Run like `mode=test ruby git_tag_cleanup` to test; | |
# use 'execute' mode to actually delete the tags | |
mode = ENV['mode'] || 'test' | |
tags_to_keep = %w[v2.0.0 v2.0.1] | |
tags_to_delete = `git tag`.split("\n") - tags_to_keep |
<div class="form"> | |
{% set form = this.beginWidget('CActiveForm', { | |
'id': 'hoge-form', | |
'enableAjaxValidation': false, | |
}) %} | |
<p class="note">Fields with <span class="required">*</span> are required.</p> | |
{{ form.errorSummary(model) }} | |
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
curl --user-agent "Googlebot/2.1 (+http://www.google.com/bot.html)" -v $@ | |
[ | |
{ "keys": ["ctrl+alt+super+c"], "command": "build", "args": {"variant": "Premailer - Inline Campaign Monitor"} }, | |
{ "keys": ["ctrl+alt+super+m"], "command": "build", "args": {"variant": "Premailer - Minify HTML"} }, | |
{ "keys": ["ctrl+alt+super+t"], "command": "build", "args": {"variant": "Premailer - Create Text Version"} } | |
] |
<?php return array ( | |
'url' => 'https://xaviesteve.com/', | |
'content' => '<!doctype html><html>...</html>', | |
'cookies' => '__cfduid=d3fa669e1069e72c2e47d127ab9b8e11f1465390629', | |
'http_code' => 200, | |
'content_type' => 'text/html; charset=UTF-8', | |
'header_size' => 578, | |
'request_size' => 229, | |
'filetime' => -1, | |
'ssl_verify_result' => 0, |
# Monit is a utility for managing and monitoring, processes, programs, files, directories and file systems on a UNIX system. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations ::: " a great little utility that monitors your daemons " | |
# in Short it lets you know when your Apache server goes down, when you reach your pre-determined memory usage. It will also restart key components should they stop working, for instance your web server ( apache ) might "crash" due to a DDOS attack or similar, monit will attempt to restart said services notifying you of whats going on, depending on your mmonit configuration ::: | |
# Official site : http://mmonit.com/ | |
# IMPORTANT : add your own data or parameters, I make use of double segments [[ your variable ]]. eg. ssh root@[[ 96.172.44.11 ]] should be replaced with ssh root@888.88.88.88 where "888.88.88.88" is your value, variable etc. I have a habit of using ":::" to indicate line ending and end of paragraph, crazy I |