Skip to content

Instantly share code, notes, and snippets.

Avatar

Tomislav trajakovic

  • Score Alarm
  • Zagreb
View GitHub Profile
@looztra
looztra / cron--hello-from-k8s-cluster.yml
Last active Oct 24, 2017
cronjobs and api batch/v2alpha1 and minikube
View cron--hello-from-k8s-cluster.yml
---
apiVersion: batch/v2alpha1
kind: CronJob
metadata:
name: hello
spec:
schedule: "*/1 * * * *"
jobTemplate:
spec:
template:
@bnielsen1965
bnielsen1965 / fedora-install-nodejs.sh
Created Apr 28, 2017 — forked from trajakovic/fedora-install-nodejs.sh
Install node.js on fedora (23+).(v5.10.1)
View fedora-install-nodejs.sh
#!/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.
@mplewis
mplewis / android_ble_char_props_cheat_sheet.md
Last active Jan 27, 2023
A cheat sheet for the bits in the bitmask of Android characteristic properties.
View android_ble_char_props_cheat_sheet.md

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

View FloatLabelLayout.java
/*
* 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
@chadedrupt
chadedrupt / AddressAutocomplete.js
Last active Jul 24, 2020
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.
View AddressAutocomplete.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 () {
@kmansoft
kmansoft / drawable_convert.py
Created May 22, 2012
A simple script to create lower-resolution Android drawables from higher-resolution ones.
View drawable_convert.py
#!/usr/bin/python
import sys
import argparse
import os
import re
'''
A simple script to create lower-resolution Android drawables from higher-resolution ones.
@gudbergur
gudbergur / README.markdown
Created Feb 19, 2012
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things
View README.markdown

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
@rfreedman
rfreedman / spock-controller-integration-spec.groovy
Created May 19, 2011
Spock Integration Spec for Grails Controllers
View spock-controller-integration-spec.groovy
/* 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,