Skip to content

Instantly share code, notes, and snippets.

@Happy-Ferret
Happy-Ferret / word_wrap.go
Created May 4, 2019 09:49 — forked from kennwhite/word_wrap.go
Basic golang word wrap string split
/*
Wrap long lines on rough column boundaries at spaces
Working example: https://play.golang.org/p/3u0X6NyMua
Based on algo from RosettaCode, which is nifty
https://www.rosettacode.org/wiki/Word_wrap#Go
*/
package main
import (
@Happy-Ferret
Happy-Ferret / todo.vue
Created March 29, 2019 15:12
ionic vue
<template>
<div class="app">
<div class="container">
<div class="row header">
<h1 class="col s6 offset-s3 center-align teal-text">To-Do List!</h1>
</div>
<div class="row">
<form @submit.prevent="submitTodo" class="col s6 offset-s3">
<ion-item>
<ion-label position="floating">What needs to be done?</ion-label>
package main
import (
"fmt"
"reflect"
)
// Animal base "class".
type Animal struct {
Name string
@Happy-Ferret
Happy-Ferret / README.md
Created November 7, 2018 12:41 — forked from badboy/README.md
Save github issues offline.

First install the required gems:

gem install octokit awesomeprint rainbow

Then run it to extract all of your open GitHub issues into files (with comments).

ruby my-gh-issues.rb
//this simple file show you how to read the XSettings properties (http://standards.freedesktop.org/xsettings-spec/xsettings-spec-0.5.html)
package main
import "fmt"
import "github.com/BurntSushi/xgb/xproto"
import "github.com/BurntSushi/xgb"
import "encoding/binary"
import "io"
import "bytes"
package main
import (
"flag"
"fmt"
"io/ioutil"
"os"
"path"
"strings"
"time"
@Happy-Ferret
Happy-Ferret / README
Created September 17, 2018 15:19 — forked from bert/README
Draw in a GdkPixbuf with Cairo
A relatively simple application that demonstrates some advanced usage of GdkPixbuf and cairo.
Two most interesting functions are documented inside sources.
@Happy-Ferret
Happy-Ferret / pulseaudio.py
Created September 14, 2018 09:46 — forked from bastibe/pulseaudio.py
A minimal CFFI interface to pulseaudio (pulse-simple)
import numpy
from cffi import FFI
ffi = FFI()
ffi.cdef("""
typedef enum pa_stream_direction {
PA_STREAM_NODIRECTION,
PA_STREAM_PLAYBACK,
PA_STREAM_RECORD,
PA_STREAM_UPLOAD
@Happy-Ferret
Happy-Ferret / README.md
Last active September 3, 2018 12:25
Wonderland assets

Graphical assets for the Wonderland WM/DE.

@Happy-Ferret
Happy-Ferret / xcb-no-decoration.cpp
Created August 27, 2018 13:35 — forked from andr1972/xcb-no-decoration.cpp
XCB library - show window without decoration
//http://stackoverflow.com/questions/5134297/xlib-how-does-this-removing-window-decoration-work
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <iostream>
#include <inttypes.h>
#include <xcb/xcb.h>
#include <xcb/xproto.h>
//xcb_event.h