Skip to content

Instantly share code, notes, and snippets.

@floatingatoll
floatingatoll / is-private-mode.js
Created January 8, 2019 19:37 — forked from jherax/is-private-mode.js
Detect if a browser is in Private Browsing mode
/**
* Detect if the browser is running in Private Browsing mode
*
* @export
* @returns {Promise}
*/
export default function isPrivateMode() {
return new Promise((resolve) => {
const on = () => resolve(true); // is in private mode
const off = () => resolve(false); // not private mode
@floatingatoll
floatingatoll / -
Created August 30, 2016 18:20 — forked from anonymous/-
Index: hiera.yaml
===================================================================
--- hiera.yaml (revision 121269)
+++ hiera.yaml (working copy)
@@ -2,16 +2,16 @@
:backends:
- yaml
:yaml:
- :datadir: /etc/puppet/hiera
+ :datadir: /etc/puppet
@floatingatoll
floatingatoll / -
Created August 30, 2016 18:19 — forked from anonymous/-
Index: hiera.yaml
===================================================================
--- hiera.yaml (revision 121269)
+++ hiera.yaml (working copy)
@@ -2,16 +2,16 @@
:backends:
- yaml
:yaml:
- :datadir: /etc/puppet/hiera
+ :datadir: /etc/puppet
@floatingatoll
floatingatoll / nntp-stats.py
Created May 23, 2016 21:45 — forked from limed/nntp-stats.py
Calculates nntp stats
#!/usr/bin/env python
import nntplib
import re
import sys
usage = """./nntp-stats [nntp-group-name]"""
if len(sys.argv) < 2:
print usage
HTTP/1.1 500 Backend Servers Unavailable
Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Service Unavailable</title>
<style type="text/css">
body, p, h1 {
@floatingatoll
floatingatoll / -
Created January 22, 2015 18:35 — forked from anonymous/-
class mig::agent {
case $::operatingsystem {
'CentOS', 'RedHat': {
package {
'mig-agent':
ensure => latest,
}
}
'Ubuntu': {
package {