Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am zeknas on github.
  • I am zeknas (https://keybase.io/zeknas) on keybase.
  • I have a public key ASCuZjTAcVZtjSUCROiGgCa4lihTck7gXj4p5UnsDIsZ6go

To claim this, I am signing this object:

@zeknas
zeknas / gist:b702dd7270e8ed4e4faa3b1a03c7c42b
Last active August 23, 2017 12:57 — forked from perusio/gist:1326701
[Mobile device detection in Nginx] with just 7 lines of configuration #nginx
### Testing if the client is a mobile or a desktop.
### The selection is based on the usual UA strings for desktop browsers.
## Testing a user agent using a method that reverts the logic of the
## UA detection. Inspired by notnotmobile.appspot.com.
map $http_user_agent $is_desktop {
default 0;
~*linux.*android|windows\s+(?:ce|phone) 0; # exceptions to the rule
~*spider|crawl|slurp|bot 1; # bots
~*windows|linux|os\s+x\s*[\d\._]+|solaris|bsd 1; # OSes
@zeknas
zeknas / 0-Simple counter: different implementations...
Created March 15, 2017 08:19 — forked from srdjan/100+ different counter apps...
Simple counter: different implementations...
different implementations of the simple counter app... code verbosity vs expressiveness
@zeknas
zeknas / .babelrc
Last active February 15, 2017 13:10
hyperapp + jsx + browserify minimal boilerplate #tags: hyperapp
{
"presets": ["es2015"],
"plugins": [
[
"transform-react-jsx",
{
"pragma": "h"
}
]
]
@zeknas
zeknas / index.html
Last active February 15, 2017 13:10
hyperapp + jsx + rollup minimal boilerplate #tags: hyperapp
<!doctype html>
<html>
<body>
<script src="bundle.js"></script>
</body>
</html>
@zeknas
zeknas / .babelrc
Last active February 15, 2017 13:10
hyperapp + jsx + webpack minimal boilerplate #tags: hyperapp
{
"presets": ["es2015"],
"plugins": [
[
"transform-react-jsx",
{
"pragma": "h"
}
]
]