Skip to content

Instantly share code, notes, and snippets.

View iphilgood's full-sized avatar
🤔
Hert am prögge

Phil Schilter iphilgood

🤔
Hert am prögge
View GitHub Profile
@sebjvidal
sebjvidal / SceneDelegate.swift
Created June 27, 2023 18:14
Custom UINavigationBar Height
// MARK: - SceneDelegate
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
let navigationController = UINavigationController(navigationBarClass: NavigationBar.self, toolbarClass: nil)
(navigationController.navigationBar as! NavigationBar).preferredHeight = 88
navigationController.setViewControllers([ViewController()], animated: false)
@svschannak
svschannak / vat_validation.js
Created March 6, 2018 15:20
VAT ID Validation
/*==================================================================================================
Application: Utility Function
Author: John Gardner
Website: http://www.braemoor.co.uk/software/vat.shtml
Version: V1.0
Date: 30th July 2005
Description: Used to check the validity of an EU country VAT number
@jepio
jepio / minted.py
Last active September 18, 2023 13:58
Pandoc filter to use minted for syntax highlighting
#!/usr/bin/env python3
'''
Filter to wrap Pandoc's CodeBlocks into minted blocks when using latex.
Pandoc's `fence_code_attributes` can be used to provide:
- the language (first class)
- minted's argumentless options (following classes)
- minted's options with arguments (attributes)
'''
@freiguy1
freiguy1 / Grunt.scala
Created March 20, 2015 04:00
Using grunt to compile runtime assets in Play Framework app
import sbt._
import Keys._
import java.net._
import java.io.File
import play.PlayRunHook
/*
Grunt runner should be in project directory to be picked up by sbt
*/
object Grunt {
@RyanHirsch
RyanHirsch / hover-action.js
Last active December 8, 2015 13:30
Ember Hover binding
import Ember from 'ember';
export default Ember.Component.extend({
didInsertElement: function() {
var $this = this.$(),
$actions = Ember.$('.actions', $this);
$this.hover(function() {
$actions.slideDown();
}, function() {
$actions.slideUp();
@mslinn
mslinn / installActivator.sh
Last active March 31, 2021 23:02
Installs Lightbend Activator on Ubuntu and Cygwin
#!/bin/bash
# From ScalaCourses.com Introduction to Play Framework with Scala course
# https://www.scalacourses.com/student/showLecture/158
set -eo pipefail
function help {
echo "Download or update Typesafe Activator on Linux and Cygwin"
echo "Usage: $(basename $0) [options]"
@mscharley
mscharley / app.js
Last active May 25, 2017 23:33 — forked from radiosilence/gist:4040553
RequireJS with Zurb Foundation 5
/*
This assumes that your bower_components folder is /assets. I renamed it in .bower.json for sanities sake.
I use baseUrl = '/js' as this is where all my custom javascript is and requirejs can't navigate
bower's folder structure anyway.
*/
requirejs.config({
paths: {
@RadoBuransky
RadoBuransky / dist-play-app-initd
Last active March 24, 2020 20:26
Init.d shell script for Play framework distributed application. Provides start, stop, restart and status commands to control applications packaged using standard "play dist" packaging command.
#!/bin/bash
#
# =========================================================================
# Copyright 2014 Rado Buransky, Dominion Marine Media
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@leon
leon / Grunt.scala
Last active September 3, 2016 02:23
Playframework 2.2 Grunt Runner
import sbt._
import Keys._
import java.net._
import java.io.File
import play.PlayRunHook
/*
Grunt runner should be in project directory to be picked up by sbt
*/
object Grunt {
@ogrrd
ogrrd / dnsmasq OS X.md
Last active May 14, 2024 08:39
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install