Skip to content

Instantly share code, notes, and snippets.

@PMTM
PMTM / gist:9ed56606b1f748d9a857
Created January 27, 2015 13:51
GIT state prompt
export PS1=\\u@\\h:$IBlack$Time12h$Color_Off'$(if [[ ${PWD} == _puth_here_git_active_path_* ]]; then \
git branch &>/dev/null;\
if [ $? -eq 0 ]; then \
echo "$(echo `git status` | grep "nothing to commit" > /dev/null 2>&1; \
if [ "$?" -eq "0" ]; then \
# @4 - Clean repository - nothing to commit
echo "'$Green'"$(__git_ps1 " (%s)"); \
else \
# @5 - Changes to working tree
echo "'$IRed'"$(__git_ps1 " {%s}"); \
@PMTM
PMTM / xhtml.html
Created May 11, 2013 22:42
XHMTL minimal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Minimal XHTML 1.0 Document with W3C DTD</title>
</head>
<body>
<p>This is a minimal <a href="http://www.w3.org/TR/xhtml1/">XHTML 1.0</a>
@PMTM
PMTM / html5.html
Created May 11, 2013 22:40
HTML5 Minimal
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>title</title>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<!-- page content -->
@PMTM
PMTM / open.c
Last active December 17, 2015 05:58
Le mee no
#include <stdio>
int main(void) {
int them;
ask(them);
rc = schedule(work);
if (rc) {
return -1;