Skip to content

Instantly share code, notes, and snippets.

View cameronscott137's full-sized avatar

Cameron Scott cameronscott137

View GitHub Profile
@cameronscott137
cameronscott137 / detweeter.js
Created February 27, 2018 21:12
Clear your Twitter Timeline
// 1) Automatically scroll to the very bottom of your timeline. This script will scroll as far as it can on any given page.
// If, after five seconds, it can't scroll any further down the page, it will alert you that it's finished.
// However, this may just mean that your timeline is slow to load. Make sure you're actually at the bottom of your timeline before proceeding to step 2
var interval;
var body = document.body;
var bottom;
var current;
interval = setInterval(function() {
bottom = body.scrollHeight; // Height
current = window.innerHeight + document.documentElement.scrollTop;
@cameronscott137
cameronscott137 / error.log
Created August 25, 2017 14:02
Screenshotter error log
[Thu Aug 24 21:50:01.610905 2017] [:error] [pid 1202] [client 54.83.145.235:57373] PHP Fatal error: Uncaught exception 'Facebook\\WebDriver\\Exception\\WebDriverCurlException' with message 'Curl error thrown for http POST to /session with params: {"desiredCapabilities":{"browserName":"chrome","platform":"ANY","chromeOptions":{"prefs":{"download.default_directory":"\\/tmp","profile.default_content_setting_values.notifications":2},"binary":"\\/usr\\/bin\\/google-chrome","args":["--user-data-dir=\\/home\\/ubuntu\\/chrome\\/"],"extensions":["Q3IyNAIAAACiAAAAgAAAADCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA+46+Em1wxGxhyYcfAOadDPYnH1UxktpjznuhfzWpvJ5XDD9+FYPIadaBJ5hsMlk0SYvow9b\\/HU+4VwPFqi+U7foEdhD2KZ\\/B8e69D6nMSXAWadMFvi3L6WOg+PMJiv0XNNm4TvlFFGacPH\\/8CznTlQxu5g5HYr0bsyJHR8dRzDECAwEAAVBtuKXMlV4UCK+viH4qA2AlJzVKULAQ0+dgUMdm3m4qXua3ilgevTemA\\/4h1anvvM2WM1bi\\/DqrRrxU0bDODRnpMJZJnG07QMpb41iKmcoOPDYzxCrD1XW0BSoMt9NYVVe1KYci4I8KGWvpseACz7jQuCNzWV51nBquql+45ruXUEsDBBQACAgIAGJWqEYAAAAAAAAAAAAAAAAFAAAAZGF0YS8DAFBLBwgAAAAAA
2017-01-05 07:38:34.529 Mach1[17406:15852895] *** Terminating app due to uncaught exception 'NSGenericException', reason: 'Task created in a session that has been invalidated'
*** First throw call stack:
(
0 CoreFoundation 0x0000000105bb434b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000104b8221e objc_exception_throw + 48
2 CFNetwork 0x00000001092173ae -[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:] + 386
3 CFNetwork 0x000000010921721e -[__NSURLSessionLocal dataTaskForRequest:completion:] + 77
4 Alamofire 0x00000001038d96be _TFFVC9Alamofire11DataRequest11Requestable4taskFzT7sessionCSo10URLSession7adapterGSqPS_14RequestAdapter__5queueCSo13DispatchQueue_CSo14URLSessionTaskU_FT_S5_ + 78
5 Alamofire 0x00000001038d97b8 _TTRXFo__oCSo14URLSessionTask_XFo__iS__ + 24
6 Alamofire 0x00000001038d
[{"name":"test","color":"Red","position":{"x":130,"y":130},"increment":false,"timestamp":false,"softdelete":false,"column":[],"relation":[],"seeding":[]}]
@cameronscott137
cameronscott137 / gist:552d52a078432baea6119258e066ed3a
Created April 18, 2016 14:10
GoShadow console output when user taps "logout"
2016-04-18 10:09:04.726 GoShadow[15272:3312405] *** Terminating app due to uncaught exception 'RLMException', reason: 'Object has been deleted or invalidated.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000112335d85 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000111da9deb objc_exception_throw + 48
2 GoShadow 0x000000010dd3fdd3 _ZL17RLMVerifyAttachedP13RLMObjectBase + 83
3 GoShadow 0x000000010dd3bcf9 _ZL10RLMGetLongP13RLMObjectBasem + 25
4 GoShadow 0x000000010dd3ca37 ___ZL17RLMAccessorGetterP11RLMProperty15RLMAccessorCode_block_invoke_4 + 39
5 GoShadow 0x000000010dc3c255 -[ExperienceListViewController loadData] + 101
6 GoShadow 0x000000010dc3c039 __43-[ExperienceListViewController viewDidLoad]_block_invoke + 105
@cameronscott137
cameronscott137 / gist:5d601b2e8d9a78f08805
Created February 3, 2016 16:40
goshadow timestudy console output
Started POST "/reports/149/import_note_data" for 127.0.0.1 at 2016-02-03 11:34:41 -0500
Processing by ReportsController#import_note_data as */*
Parameters: {"segment_id"=>"605", "import_section"=>"Time Study", "id"=>"149"}
User Load (0.6ms) SELECT "users".* FROM "users" WHERE ("users"."status" != 'Deleted') AND "users"."id" = 22 ORDER BY "users"."id" ASC LIMIT 1
Organization Load (0.2ms) SELECT "organizations".* FROM "organizations" WHERE "organizations"."id" = $1 LIMIT 1 [["id", 2]]
Report Load (0.2ms) SELECT "reports".* FROM "reports" WHERE "reports"."id" = $1 LIMIT 1 [["id", 149]]
WorkGroup Load (0.2ms) SELECT "work_groups".* FROM "work_groups" WHERE ("work_groups"."status" != 'Deleted') AND "work_groups"."id" = $1 LIMIT 1 [["id", 268]]
Event Load (0.2ms) SELECT "events".* FROM "events" WHERE ("events"."deleted" != 't') AND "events"."work_group_id" = $1 AND "events"."is_published" = 't' [["work_group_id", 268]]
Event Load (1.4ms) SELECT "events".* FROM "events" WHERE ("e
@cameronscott137
cameronscott137 / gist:3e0f1a941cafe0cf9620
Created November 17, 2015 13:56
xcode console output
2015-11-17 08:54:25.299 GoShadow[48510:3793585] CFNetwork SSLHandshake failed (-9806)
2015-11-17 08:54:48.270 GoShadow[48510:3793244] POST 'http://platform.goshadow.org/api_v2/segments/638/notes': {
"Accept-Language" = "en-US;q=1";
Authorization = "Token token=\"796746fe-84fa-4c49-ba35-172cfe3f489e\"";
"Content-Type" = "application/json";
"User-Agent" = "GoShadow/2.0 (iPhone; iOS 9.0; Scale/2.00)";
} {"note":{"touch_point_id":0,"id":0,"note":"test test ","accumulated_time":0,"favorite":false,"highlight":false,"start_time":null,"updated_at":"2015-11-17 08:54:48 -0500","created_at":"2015-11-17 08:54:48 -0500","segment_id":638,"user_id":113,"note_category_id":0,"attachment_data":"","caregiver_id":0}}
2015-11-17 08:54:48.337 GoShadow[48510:3793244] 500 'http://platform.goshadow.org/api_v2/segments/638/notes' [0.0672 s]: {
Connection = "keep-alive";
"Content-Length" = 48;
@cameronscott137
cameronscott137 / spacing.scss
Created September 22, 2015 18:51
CSS Spacing Examples
/* Every selector should be comma-seperated and on its own line: */
//Right
.header,
.footer{}
//Wrong
.header, .footer{}
/* Every CSS block should be separated by a single empty line.*/
@cameronscott137
cameronscott137 / nesting.scss
Last active September 22, 2015 18:27
Nesting Examples
// Right
.navbar li a:hover{}
.header .left-nav{}
// Wrong
.navbar{
li{
a{
@cameronscott137
cameronscott137 / gist:6704d2b1268b443654a7
Created August 3, 2015 20:41
Hides popovers when tooltip is active
Map.init = function() {
jQuery.get('resources.json', function(resources) {
Map.resources = resources;
$('#map').load('map.svg', function() {
$('svg').svg();
var svg = $('svg').svg('get');
if (!$('rect').hasClass("selected")) {
$(this).hover(Map.tooltip);
}
$('svg').mouseout(Map.tooltipHide);