Skip to content

Instantly share code, notes, and snippets.

View ivucica's full-sized avatar
🌌
Hey! You! What are you looking at?

Ivan Vučica ivucica

🌌
Hey! You! What are you looking at?
View GitHub Profile
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_adisk._tcp</type>
<txt-record>sys=waMa=0,adVF=0x100</txt-record>
<txt-record>dk0=adVN=Time Capsule,adVF=0x82</txt-record>
</service>
<service>
@junpluse
junpluse / CAEAGLLayer+Snapshot.swift
Last active August 28, 2020 06:14
Take snapshot from CAEAGLLayer
import QuartzCore
import OpenGLES
extension CAEAGLLayer {
func takeSnapshot(from renderBuffer: GLuint? = nil) -> UIImage {
var bufferWidth: GLint = 0
var bufferHeight: GLint = 0
if let buffer = renderBuffer {
glBindRenderbufferOES(GLenum(GL_RENDERBUFFER_OES), buffer)
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@doitian
doitian / irssi_notify.sh
Created December 26, 2011 16:50
Send irssi notify through growl (Mac) or notify-send (Linux)
#!/bin/sh
function main ()
{
local icon=$HOME/Dropbox/Photos/icons/irssi-icon.png
if which growlnotify > /dev/null 2>&1; then
growlnotify -w -n Irssi --image $icon -m "$2" "$1"
elif which notify-send > /dev/null 2>&1; then
notify-send -i $icon "$1" "$2"
fi