Skip to content

Instantly share code, notes, and snippets.

View trajakovic's full-sized avatar

Tomislav trajakovic

  • Score Alarm
  • Zagreb
View GitHub Profile
@rfreedman
rfreedman / spock-controller-integration-spec.groovy
Created May 19, 2011 13:41
Spock Integration Spec for Grails Controllers
/* Copyright 2011 the original author or authors.
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@bnielsen1965
bnielsen1965 / fedora-install-nodejs.sh
Created April 28, 2017 19:37 — forked from trajakovic/fedora-install-nodejs.sh
Install node.js on fedora (23+).(v5.10.1)
#!/usr/bin/env bash
#
# NodeJS Installer based on https://gist.github.com/trajakovic/ad9f91776dea3b495db0
#
# Added version option and distinct commands for install, uninstall, path setting,
# and removepath setting.
#
# https://gist.github.com/bnielsen1965
#
# THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
@looztra
looztra / cron--hello-from-k8s-cluster.yml
Last active October 24, 2017 07:21
cronjobs and api batch/v2alpha1 and minikube
---
apiVersion: batch/v2alpha1
kind: CronJob
metadata:
name: hello
spec:
schedule: "*/1 * * * *"
jobTemplate:
spec:
template:
@kmansoft
kmansoft / drawable_convert.py
Created May 22, 2012 21:39
A simple script to create lower-resolution Android drawables from higher-resolution ones.
#!/usr/bin/python
import sys
import argparse
import os
import re
'''
A simple script to create lower-resolution Android drawables from higher-resolution ones.
@chadedrupt
chadedrupt / AddressAutocomplete.js
Last active July 24, 2020 01:37
Knockout Binding for Google Places autocomplete input. Also populates sibling bindings that match address component types of the places api. That part depends on underscore.js.
ko.bindingHandlers.addressAutocomplete = {
init: function (element, valueAccessor, allBindingsAccessor) {
var value = valueAccessor(), allBindings = allBindingsAccessor();
var options = { types: ['geocode'] };
ko.utils.extend(options, allBindings.autocompleteOptions)
var autocomplete = new google.maps.places.Autocomplete(element, options);
google.maps.event.addListener(autocomplete, 'place_changed', function () {
@gudbergur
gudbergur / README.markdown
Created February 19, 2012 23:49
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things

This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
  $('.typeahead').typeahead(
    # source can be a function
    source: (typeahead, query) ->
 # this function receives the typeahead object and the query string
@mplewis
mplewis / android_ble_char_props_cheat_sheet.md
Last active May 15, 2023 17:45
A cheat sheet for the bits in the bitmask of Android characteristic properties.

Characteristic Property Cheat Sheet

for Android Bluetooth Low Energy

Tired of remembering which properties go with which bits in the properties bitmask of a BluetoothGattCharacteristic? Me too. Here's an easy-to-read table. Source.

BluetoothGattCharacteristic

Properties

Bit Value | Meaning

@chrisbanes
chrisbanes / FloatLabelLayout.java
Last active March 15, 2024 06:39
FloatLabelLayout
/*
* Copyright 2014 Chris Banes
*
* 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
*
* Unless required by applicable law or agreed to in writing, software