Skip to content

Instantly share code, notes, and snippets.

View abemassry's full-sized avatar

Abe Massry abemassry

View GitHub Profile
@abemassry
abemassry / curl_post_update.php
Created July 25, 2012 15:54
PHP script to log into a drupal site and update a form using curl, can be used with other sites besides drupal
<?php
//
// curl_post_update.php
// You can modify this script to make PHP use a webpage like a person sitting
// at a computer would use a webpage.
//
// tags: #php #curl #form
//
// This script is licensed under the JSON licence http://www.json.org/license.html
// "The Software shall be used for Good, not Evil." style license
@abemassry
abemassry / curl_post_upload.php
Created July 27, 2012 18:30
PHP script to log into a drupal site and update a form and upload using curl
<?php
//
// this gist takes most of the code from https://gist.github.com/3176917 but adds in form uploading which is just an @ symbol
// this also explores different options for the form data
//
// curl_post_upload.php
// You can modify this script to make PHP use a webpage like a person sitting
// at a computer would use a webpage.
//
// tags: #php #curl #form #upload
#!/usr/bin/python
#
import os, sys
import pycurl
import time
import datetime
from StringIO import StringIO
from datetime import date, timedelta
from HTMLParser import HTMLParser
@abemassry
abemassry / watcher.sh
Created October 6, 2013 01:11
watch a file for changes and log to logfile
#!/bin/bash
while [ 1 ]; do
before=`cat $1`
sleep 1
after=`cat $1`
if [ "$before" != "$after" ]; then
today=`date`
echo "$1 changed on: $today" >> logfile.log
echo "$1 changed on: $today and logged"
fi
@abemassry
abemassry / meshblu_troubleshooting.js
Created August 7, 2014 14:37
meshblu troubleshooting
var https_options = {
certificate: fs.readFileSync(config.tls.cert).toString(),
key: fs.readFileSync(config.tls.key).toString()
};
@abemassry
abemassry / keybase.md
Last active July 19, 2016 19:01
keybase.md

Keybase proof

I hereby claim:

  • I am abemassry on github.
  • I am abemassry (https://keybase.io/abemassry) on keybase.
  • I have a public key ASB-tG-_Cn6QZZMgeeq4rQFPGbBHVuZL54tmpVWi26xIlgo

To claim this, I am signing this object:

This file has been truncated, but you can view the full file.
./assets/weblish/xterm.css: z-index: -10;
./assets/weblish/xterm.css: z-index: 1;
./gist:./assets/weblish/xterm.css: z-index: -10;
./gist:./assets/weblish/xterm.css: z-index: 1;
./gist:./node_modules/bootstrap/dist/css/bootstrap-flex.css: z-index: 1000;
./gist:./node_modules/bootstrap/dist/css/bootstrap-flex.css: z-index: 990;
./gist:./node_modules/bootstrap/dist/css/bootstrap-flex.css: z-index: 2;
./gist:./node_modules/bootstrap/dist/css/bootstrap-flex.css: z-index: 2;
./gist:./node_modules/bootstrap/dist/css/bootstrap-flex.css: z-index: 2;
./gist:./node_modules/bootstrap/dist/css/bootstrap-flex.css: z-index: 3;
./assets/weblish/xterm.css: z-index: -10;
./assets/weblish/xterm.css: z-index: 1;
./gist:./assets/weblish/xterm.css: z-index: -10;
./gist:./assets/weblish/xterm.css: z-index: 1;
./gist:./node_modules/bootstrap/dist/css/bootstrap-flex.css: z-index: 1000;
./gist:./node_modules/bootstrap/dist/css/bootstrap-flex.css: z-index: 990;
./gist:./node_modules/bootstrap/dist/css/bootstrap-flex.css: z-index: 2;
./gist:./node_modules/bootstrap/dist/css/bootstrap-flex.css: z-index: 2;
./gist:./node_modules/bootstrap/dist/css/bootstrap-flex.css: z-index: 2;
./gist:./node_modules/bootstrap/dist/css/bootstrap-flex.css: z-index: 3;
Uncaught (in promise) TypeError: Cannot read property 'cpu' of undefined
at new DashboardPage (eval at <anonymous> (bundle.js:4603), <anonymous>:2:902)
at eval (eval at <anonymous> (bundle.js:8647), <anonymous>:98:24)
at instantiate (eval at <anonymous> (bundle.js:8647), <anonymous>:106:9)
at new DashboardPage (eval at proxyClass (eval at <anonymous> (bundle.js:8647)), <anonymous>:4:17)
at eval (eval at <anonymous> (bundle.js:8191), <anonymous>:295:18)
at measureLifeCyclePerf (eval at <anonymous> (bundle.js:8191), <anonymous>:75:12)
at ReactCompositeComponentWrapper._constructComponentWithoutOwner (eval at <anonymous> (bundle.js:8191), <anonymous>:294:16)
at ReactCompositeComponentWrapper._constructComponent (eval at <anonymous> (bundle.js:8191), <anonymous>:280:21)
at ReactCompositeComponentWrapper.mountComponent (eval at <anonymous> (bundle.js:8191), <anonymous>:188:21)
for i in `bc <<< "obase = 16 ; $(seq 0 65536)" | tr '\n' ' '`; do printf "$i:"; printf "\u$i"; printf '\n'; done | rs -e | less