Skip to content

Instantly share code, notes, and snippets.

View nivekmai's full-sized avatar

Kevin Christensen nivekmai

  • WhatsApp
  • Mountain View
View GitHub Profile
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('-t', '--test', dest='test', action='store_true')
args = parser.parse_args()
print args.test
'''
$python parser.py -t

#Why don't I get notifications?

To ensure the prompt delivery of WhatsApp message notifications, please check that you have a good internet connection and your phone is configured properly.

Possible reasons for not receiving notifications:

  • Muted groups do not display notifications.
  • You have disabled all notifications in the WhatsApp settings.
  • You have unchecked Show notifications in System settings > Apps > WhatsApp
@nivekmai
nivekmai / gp.md
Last active August 29, 2015 13:57

I'm having trouble downloading WhatsApp from Google Play.

As a chat program, WhatsApp has a mature content rating. If you have configured your content filtering, you will need to set it to at least High maturity.

If you are seeing errors after downloading the app (403, 427, 495, 919, 927 etc.) please check the Google Play Help Center for troubleshooting steps.

If you see a "Not available in your country" error or if the Google Play Help Center troubleshooting tips did not help, you will have to download WhatsApp from our website. You will have to turn on Unknown sources inside Security in your phone settings. We recommend that you turn this back off once you have downloaded WhatsApp from our website.

Cheers,
WhatsApp Support

function fetch_html ($url){
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_USERPWD, ZDUSER."/token:".ZDAPIKEY);
curl_setopt($ch, CURLOPT_USERAGENT, "Lynx/2.8.8dev.3 libwww-FM/2.14 SSL-MM/1.4.1");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_VERBOSE, TRUE);
$webpage = curl_exec($ch);
curl_close($ch);
return $webpage;
@nivekmai
nivekmai / home.conf
Created October 15, 2016 05:34
Home Assistant NGINX config (raspberry pi 3, letsencrypt)
server {
listen 80;
server_name home.foo.com;
root /var/www/home;
location / {
return 301 https://$host$request_uri;
}
location ~ /.well-known {
try_files $uri $uri/ @home_assistant;
}
@nivekmai
nivekmai / SimpleDividerItemDecoration
Last active May 5, 2020 20:32 — forked from Leaking/SimpleDividerItemDecoration
A simple RecyclerView ItemDecoration drawing a horizon line and you can set the height and the color.It looks like the listview divider.
package com.quinn.xmpp.ui.widget;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import com.quinn.xmpp.R;
@nivekmai
nivekmai / index.html
Created September 21, 2022 23:45
YzLxYRV
<script src="https://cdn.jsdelivr.net/npm/svg-pan-zoom@3.6.1/dist/svg-pan-zoom.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/StephanWagner/svgMap@v2.7.2/dist/svgMap.min.js"></script>
<link href="https://cdn.jsdelivr.net/gh/StephanWagner/svgMap@v2.7.2/dist/svgMap.min.css" rel="stylesheet">
<div id="svgMap"></div>
@nivekmai
nivekmai / script.js
Created January 30, 2023 06:06
Snapmaker Laser Scanner
import { OrbitControls } from "https://cdn.jsdelivr.net/gh/mrdoob/three.js@r121/examples/jsm/controls/OrbitControls.js";
import { STLExporter } from "https://cdn.jsdelivr.net/gh/mrdoob/three.js@r121/examples/jsm/exporters/STLExporter.js";
import fileSaver from "https://cdn.skypack.dev/file-saver@2.0.5";
import { MeshPhysicalMaterial, Scene, PerspectiveCamera, WebGLRenderer, MeshBasicMaterial, PlaneGeometry, Mesh, AmbientLight, RectAreaLight, DoubleSide} from "https://cdn.skypack.dev/three@0.149.0";
// Main
// Build the heightmap after collecting measured points from the machine
const { points, width, depth } = getPoints();
// "UI"
const button = makeDownloadButton();