This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- echo ' <this text>' | awesome-client | |
-- for ssh usage prepend 'export DISPLAY=:0;' | |
local n = require("naughty"); | |
n.notify({preset = n.config.presets.critical, | |
title = "Oops, a birthday happened!", | |
text = "(dont shit your pants)"}); | |
local t = timer({timeout=10}); | |
local function dev() | |
n.notify({preset = { bg = "#ffaa00", fg = "#ffffff", timeout = 0 }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************************* | |
* GLFW 3.0 - www.glfw.org | |
* A library for OpenGL, window and input | |
*------------------------------------------------------------------------ | |
* Copyright (c) 2002-2006 Marcus Geelnard | |
* Copyright (c) 2006-2010 Camilla Berglund <elmindreda@elmindreda.org> | |
* | |
* This software is provided 'as-is', without any express or implied | |
* warranty. In no event will the authors be held liable for any damages | |
* arising from the use of this software. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//----------------------------------------------------------------------------- | |
// | |
// ImageLib Sources | |
// Copyright (C) 2000-2009 by Denton Woods | |
// Last modified: 03/07/2009 | |
// | |
// Filename: il/il.d | |
// | |
// Description: The main include file for DevIL | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MathJax Extension | |
// $$ F = m * a $$ -> ` F = m \cdot a ` | |
// $$$ F = m * a $$$ -> <script type="math/tex; mode=display"> F = m \cdot a </script> | |
// | |
// | |
// Dont forget to include | |
// | |
// <script type="text/javascript" | |
// src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_HTMLorMML"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string humanByte(byte decimals = 2)(double bytes) | |
{ | |
import std.string; | |
enum suffix = [ "", "K", "M", "G", "T", "P", "E"]; | |
byte i; | |
while(bytes > 1024.0) { | |
bytes /= 1024.0; | |
i++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import | |
std.array, | |
std.conv, | |
std.string; | |
version(Have_vibe_d) { | |
import vibe = vibe.inet.url; | |
} | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const vec3 Camera::axisV = {0.f, 1.f, 0.f}; | |
const vec3 Camera::axisF = {0.f, 0.f, 1.f}; | |
mat4 Camera::getView(const vec3& pos, const quat& rot) const | |
{ | |
vec3 up = rot * axisV; | |
vec3 forward = rot * axisF; | |
return glm::lookAt(pos, pos + forward, up); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* PHP System Status | |
* ------------------------------------------ | |
* Author: wutno (#/g/tv - Rizon) | |
* Last update: 1/4/2012 5:28AM -5GMT (USELESS BLOAT) | |
* | |
* | |
* GNU License Agreement | |
* --------------------- | |
* This program is free software; you can redistribute it and/or modify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void buildVar(DBusMessageIter *iter, Variant var, int sig) | |
{ | |
import std.meta; | |
alias basic = AliasSeq!(byte,bool,short,ushort,int,uint,long,ulong,double,string); | |
foreach(T; basic) { | |
T* p = var.peek!T; | |
if(p) { | |
buildIter!T(iter, *p); | |
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Return the number of running processes of the system */ | |
ulong getProcNum() | |
{ | |
version(linux) | |
{ | |
import std.file, std.algorithm, std.ascii; | |
return "/proc".dirEntries(SpanMode.shallow).count!(a => a.name.baseName.all!isDigit); | |
} | |
} |
OlderNewer