Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am cromestant on github.
  • I am charz (https://keybase.io/charz) on keybase.
  • I have a public key ASD25NoZOrCedyyIVXTJ6YwFYSL7cWURB1zvDwrptjvEKwo

To claim this, I am signing this object:

@cromestant
cromestant / zop_custom.js
Created March 16, 2017 18:38
Zendesk Zopim online toggler by department
//don't forget to set department ID and URL within the code.
var DEPARTMENT_ID = ##########;
window.zEmbed || function(e, t) {
var n, o, d, i, s, a = [],
r = document.createElement("iframe");
window.zEmbed = function() {
a.push(arguments)
}, window.zE = window.zE || window.zEmbed, r.src = "javascript:false", r.title = "", r.role = "presentation", (r.frameElement || r).style.cssText = "display: none", d = document.getElementsByTagName("script"), d = d[d.length - 1], d.parentNode.insertBefore(r, d), i = r.contentWindow, s = i.document;
try {
>>> res
{'20160717': {u'CR': [u'CR_CR-100498', u'CR_CR-10787945', u'CR_CR-10991444', u'CR_CR-11095103', u'CR_CR-11178238', u'CR_CR-76714', u'CR_CR-11118472', u'CR_CR-10824291', u'CR_CR-10982013', u'CR_CR-1001882', u'CR_CR-11185536', u'CR_CR-1055449', u'CR_CR-95200', u'CR_CR-11056804', u'CR_CR-10877767', u'CR_CR-10990189', u'CR_CR-10824027', u'CR_CR-10985616', u'CR_CR-10767142', u'CR_CR-11181100', u'CR_CR-10812669', u'CR_CR-11185135', u'CR_CR-11150768', u'CR_CR-10818937', u'CR_CR-11062265', u'CR_CR-10834000', u'CR_CR-11180616', u'CR_CR-108563', u'CR_CR-10848314', u'CR_CR-11129706', u'CR_CR-10985570', u'CR_CR-11092420', u'CR_CR-10029663', u'CR_CR-10719779', u'CR_CR-11010366', u'CR_CR-10776123', u'CR_CR-10989584', u'CR_CR-64835', u'CR_CR-11094181', u'CR_CR-11184199', u'CR_CR-73107', u'CR_CR-10684834', u'CR_CR-11047877', u'CR_CR-11179944', u'CR_CR-10972432', u'CR_CR-11183686', u'CR_CR-11004144', u'CR_CR-6051220', u'CR_CR-11004144', u'CR_CR-10967427', u'CR_CR-10747090', u'CR_CR-11185394', u'CR_CR-10901139', u'CR_C

Keybase proof

I hereby claim:

  • I am cromestant on github.
  • I am charz (https://keybase.io/charz) on keybase.
  • I have a public key whose fingerprint is 8731 07B4 67E9 6B07 A8CF 9C88 8481 FABE EB0F 09C0

To claim this, I am signing this object:

@cromestant
cromestant / Convert your flac to
Created December 14, 2015 19:04
How to convert your Flac collection to sonos compatible.
First download SOX.
Then duplicate the directory structure:
find . -type d -exec mkdir ~/Destination Folder/{} \;
then use sox to convert
find . -name *.flac -exec bash -c '/path_to_sox_binary/sox -S "{}" -r 44100 -b 16 ~/path_to_destination_folder/"{}"' \;
Charles-Romestant-MacBook-Air:openid-test cromestant$ curl -v "http://2much.ch/" -c much.txt >/dev/null
* Hostname was NOT found in DNS cache
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 94.126.23.52...
* Connected to 2much.ch (94.126.23.52) port 80 (#0)
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0> GET / HTTP/1.1
> User-Agent: curl/7.37.1
> Host: 2much.ch
> Accept: */*
Charles-Romestant-MacBook-Air:openid-test cromestant$ curl -v "https://url.com/oauth/v2/authorize?redirect_uri=http%3A%2F%2Fopenidtest.url.net%3A3000%2Fcallback&client_id=ididid&scope=openid%20mobileid&login_hint=&prompt=none&response_type=code" -c cookies.txt >/dev/null
* Hostname was NOT found in DNS cache
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 54.236.147.89...
* Connected to url.com (54.236.147.89) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
* Server certificate: id.tigo.com
* Server certificate: Thawte SSL CA
* Server certificate: thawte Primary Root CA