Skip to content

Instantly share code, notes, and snippets.

View althaus's full-sized avatar
🏠
Working from home

Matthias Althaus althaus

🏠
Working from home
View GitHub Profile
@alana-mullen
alana-mullen / AndroidManifest.xml
Last active August 8, 2018 00:34
Setting up styles.xml and values-v21/styles.xml to use Material Design with AppCompat. Rename styles21.xml as styles.xml and place in your res/values-v21 folder (you may need to create a values-v21 folder if you don't already have one).
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="uk.co.thewirelessguy.myappname" >
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
@moklick
moklick / countries.topo.json
Last active April 3, 2020 06:17
Maps with TopoJSON, Leaflet & Chroma.js http://blog.webkid.io
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arosenb2
arosenb2 / BasicChildBrowser.swift
Last active May 24, 2024 03:56
A child web browser without navigation features in iOS using WKWebView in Swift
import Foundation
import UIKit
import Webkit
class BasicChildBrowser:UIViewController, WKNavigationDelegate {
let web = WKWebView()
let toolbar = UIToolbar()
let progressSpinner = UIActivityIndicatorView(activityIndicatorStyle: .White)
let progressBar = UIProgressView(progressViewStyle: .Bar)
@bollwyvl
bollwyvl / README.md
Last active July 20, 2023 18:38
A fishbone editor
  • Make a bulleted Markdown list in the top left to update the list
  • Press edit to hide the editor
  • Press save to use [SVG Crowbar][crowbar] to save a copy
  • Click to drag nodes

This is an integration of [this implementation][orig] of a [Fishbone or Ishikawa][ish] diagram, which shows contributions of different levels of a hierarchy to a main concept, with a Markdown editor for making quick diagrams.

The diagram is implemented in [d3.js][d3], while rich-text editing is provided by [CodeMirror][cm], and [marked][mkd] handles Markdown processing.

@Tomanow
Tomanow / radiolist for x-editable
Created December 30, 2013 21:59
Modified radio / radiolist gist. Requires x-editable. Adds 'radiolist' option to x-editable where you can use radio inputs.
/**
* X-Editable Radiolist extension for Bootstrap 3
* @requires X-Editable, jquery, etc.
* @example:
$('.editable-earn-method').editable({
name: 'earn_method',
source: [
{value: 'swipes', text: 'Number of swipes'},
{value: 'spend', text: 'Spend Amount ($USD)'}
@CMCDragonkai
CMCDragonkai / angularjs_directive_attribute_explanation.md
Last active November 29, 2023 15:35
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
@leecrossley
leecrossley / index.html
Created July 18, 2013 08:48
A CodePen by Lee Crossley. Avatar Generator from Name - A name (first name and surname) is input and a canvas element is output using the initials from the name and a background colour (based on the first name first letter). The background colours are from from http://flatuicolors.com/ Now with retina support.
<canvas id="user-icon" width="256" height="256"></canvas>
@dantleech
dantleech / convert.php
Last active November 23, 2018 13:18
Script to convert symfony YAML translation file to XLIFF
<?php
// Script to convert Symfony YAML translation files to XLIFF.
//
// Will add a .xliff version of the given file in its directory.
//
// $ php convert.php path/to/MyBundle.en.yml
$file = $argv[1];
@dexterca
dexterca / glyphicons-pro.less
Last active December 15, 2015 19:49
The glyphicons-pro.less file is intended to bolt onto Twitter Bootstrap and includes classes for the GLYPHICONS PRO icon set. The GLYPHICONS PRO set contains 470+ icons. This file is compatible with Twitter Bootstrap v3+ A GLYPHICONS PRO license is required. Once a license is purchased, download the appropriate font files (glyphicons-regular.eot…
//
// Glyphicons 1.8.1
// -----------------------------------------------------------------------------
// About
//
// Glyphicons font-based icons require you to include all relevant font files,
// found in the Bootstrap repo under /fonts/. Files are referenced relative to
// the compiled CSS.
//
@fguillen
fguillen / nice_file_field.js
Last active February 22, 2019 18:33
Pretty 'input[type="file"]' for Bootstrap addicts
// Based in: http://duckranger.com/2012/06/pretty-file-input-field-in-bootstrap/
// Version: 0.0.3
// Compatibility with: Bootstrap 3.2.0 and jQuery 2.1.1
// Use:
// <input class="nice_file_field" type="file" data-label="Choose Document">
// <script> $(".nice_file_field").niceFileField(); </script>
//
(function( $ ) {
$.fn.niceFileField = function() {
this.each(function(index, file_field) {