Skip to content

Instantly share code, notes, and snippets.

Omar A hagope

Block or report user

Report or block hagope

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hagope
hagope / dash-listen-3.py
Last active Nov 21, 2015 — forked from courtsimas/dash-listen-3.py
listen on network for push of Amazon dash button; this version uses arp-scan instead of scapy
View dash-listen-3.py
import subprocess
import requests
import time
import os,sys
MAGIC_FORM_URL = 'http://api.cloudstitch.io/...your_url'
def record_wake():
data = {
"Timestamp": time.strftime("%Y-%m-%d %H:%M"),
View QlikView_Convert_from_Unix_Timestamp.qvs
// Solution 1:
Timestamp = ConvertToLocalTime(Date(MakeDate(1970, 1, 1) + (<timestamp_field> / 86400)), '<time_zone>')
// Solution 2:
Timestamp = ConvertToLocalTime(Date(25569 + (<timestamp_field> / 86400)), '<time_zone>')
// my need
ConvertToLocalTime(Date(MakeDate(1970, 1, 1) + (epoch_ts / 86400)))
View whiteboardCleaner.md

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2

Results

@hagope
hagope / pt_stalk replication delay
Last active Dec 27, 2015 — forked from silviabotros/pt_stalk replication delay
Getting the Seconds_Behind_Master status from MySQL
View pt_stalk replication delay
mysql -h localhost -u root -e "show slave status\G" | grep "Seconds_Behind_Master" | awk '{print $2}'
View gist:4596406
iPad
1024 × 690 In landscape on iOS 4.3
1024 × 672 In landscape on iOS 5
768 × 946 In portrait on iOS 4.3
768 × 928 In portrait on iOS 5
1024 × 660 Always showing bookmarks bar in landscape on iOS 4.3
1024 × 644 Always showing bookmarks bar in landscape on iOS 5
768 × 916 Always showing bookmarks bar in portrait on iOS 4.3
You can’t perform that action at this time.