Skip to content

Instantly share code, notes, and snippets.

View nickknissen's full-sized avatar

Nick nickknissen

  • Uptime Development
  • Denmark
View GitHub Profile
@NielsLeenheer
NielsLeenheer / Samsung Browser
Last active June 23, 2020 11:33
Samsung Browser
Note: Some older devices such as the Galaxy S III did not get the Chromium based browser with
the update to Android 4.2 or later. When Samsung later introduced the Galaxy S3 Neo it did get
the new browser.
Note: With the Android 4.3 release and version 1.5 of the Chromium browser, Samsung did not
enable WebAudio API for the Note 3. All other devices did get the WebAudio API.
Note: Samsung did not update the browser version with the upgrade from Android 4.3 to 4.4,
but did add getUserMedia and WebRTC functionality.

AngularStrap Modal Wrapper

This describes a provider/service for wrapping the AngularStrap $modal service. It allows for somewhat easier programatic usage.

Usage

First, you define a modal using the provider. Modals are named, and have default configuration for the underlying $modal service:

angular.module('app', ['app.modals']).config (modalsProvider) ->
@kracekumar
kracekumar / Writing better python code.md
Last active April 11, 2025 10:44
Talk I gave at June bangpypers meetup.

Writing better python code


Swapping variables

Bad code

import time
import sys
ms = int(sys.argv[1]) if len(sys.argv) > 1 else 250
words, start = 0, time.time()
print "\n"*2
try:
for line in sys.stdin:
@JamieMason
JamieMason / protractor_members.txt
Created July 4, 2013 09:52
Methods available to you in a Jasmine test using https://github.com/juliemr/protractor/
protractor.wrapDriver
protractor.setInstance
protractor.getInstance
protractor.By
protractor.By.binding
protractor.By.select
protractor.By.selectedOption
protractor.By.input
protractor.By.repeater
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 5, 2025 13:05
A badass list of frontend development resources I collected over time.
@thomseddon
thomseddon / gist:4703968
Last active September 9, 2024 04:24
Auto Expanding/Grow textarea directive for AngularJS
/**
* The MIT License (MIT)
*
* Copyright (c) 2013 Thom Seddon
* Copyright (c) 2010 Google
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 7, 2025 23:53
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@dahlia
dahlia / hstore.py
Created February 18, 2012 14:58
PostgreSQL hstore + SQLAlchemy
""":mod:`hstore` --- Using PostgreSQL hstore with SQLAlchemy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. note::
I released it under Public Domain. Feel free to use!
It provides :class:`Hstore` type which makes you to store Python
dictionaries into hstore columns in PostgreSQL. For example::