Skip to content

Instantly share code, notes, and snippets.

View ff6347's full-sized avatar
🤖
updating status…

Fabian Morón Zirfas ff6347

🤖
updating status…
View GitHub Profile
@al3x
al3x / newpost.rb
Created April 22, 2009 23:50
Handy new post script for Jekyll blogs or similar
#!/usr/bin/env ruby
unless ARGV[0]
puts 'Usage: newpost "the post title"'
exit(-1)
end
date_prefix = Time.now.strftime("%Y-%m-%d")
postname = ARGV[0].strip.downcase.gsub(/ /, '-')
post = "/Users/al3x/src/al3x.github.com/_posts/#{date_prefix}-#{postname}.textile"
@zigzag
zigzag / newpost.rb
Created December 12, 2009 13:38 — forked from al3x/newpost.rb
New post command shell for Jekyll
#!/usr/bin/ruby
unless ARGV[0]
puts 'Usage: np "the post title"'
exit(-1)
end
title = ARGV.join ' '
date_prefix = Time.now.strftime("%Y-%m-%d")
postname = title.strip.downcase.gsub(/ /, '-')
@stagas
stagas / how-to-run-apache-and-node.js-together-the-right-way.markdown
Created December 24, 2010 14:45
How to run Apache and Node.js together (the right way)

Step 1

Get a VPS that offers 2 or more IP addresses.

Step 2

From the WHM cPanel, find the menu item Service Configuration, select Apache Configuration and then click on Reserved IPs Editor.

Step 3

@jehiah
jehiah / simple_args_parsing.sh
Created March 4, 2011 16:56
a simple way to parse shell script arguments
#!/bin/sh
#
# a simple way to parse shell script arguments
#
# please edit and use to your hearts content
#
ENVIRONMENT="dev"
@mbostock
mbostock / .block
Last active February 2, 2021 04:59
Build Your Own Graph!
license: gpl-3.0
redirect: https://observablehq.com/@d3/build-your-own-graph
@mbostock
mbostock / .block
Last active February 26, 2019 22:34
Random Tree
license: gpl-3.0
redirect: https://observablehq.com/@mbostock/random-tree
@michaelt
michaelt / latex.template
Created June 9, 2011 21:23
Simple Pandoc default.latex with comments
%!TEX TS-program = xelatex
\documentclass[12pt]{scrartcl}
% The declaration of the document class:
% The second line here, i.e.
% \documentclass[12pt]{scrartcl}
% is a standard LaTeX document class declaration:
% we say what kind of document we are making in curly brackets,
% and specify any options in square brackets.
@kylebarrow
kylebarrow / example.html
Created June 23, 2011 06:30
Prevent links in standalone web apps opening Mobile Safari
<!DOCTYPE html>
<head>
<title>Stay Standalone</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<script src="stay_standalone.js" type="text/javascript"></script>
</head>
<body>
<ul>
<li><a href="http://google.com/">Remote Link (Google)</a></li>
@mbostock
mbostock / .block
Last active March 7, 2024 22:20
Collapsible Force Layout
license: gpl-3.0
@mbostock
mbostock / .block
Last active November 26, 2023 18:48 — forked from ZoltanLajosKis/d3jsproblem.html
Modifying a Force Layout
license: gpl-3.0
redirect: https://observablehq.com/@d3/modifying-a-force-directed-graph