Skip to content

Instantly share code, notes, and snippets.

🤙

Dan Sullivan deepeeess

🤙
Block or report user

Report or block deepeeess

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
View gist:a2fcf585608fbb9645a8
Started GET "/admin/employees/645114968/blogposts" for 127.0.0.1 at 2014-07-28 17:40:10 -0500
Processing by Admin::BlogpostsController#index as HTML
Parameters: {"employee_id"=>"645114968"}
AdminUser Load (0.2ms) SELECT "admin_users".* FROM "admin_users" WHERE "admin_users"."id" = 1 LIMIT 1
Completed 500 Internal Server Error in 3ms
NoMethodError (undefined method `find' for nil:NilClass):
inherited_resources (1.5.0) lib/inherited_resources/belongs_to_helpers.rb:90:in `evaluate_parent'
inherited_resources (1.5.0) lib/inherited_resources/base_helpers.rb:144:in `block in association_chain'
inherited_resources (1.5.0) lib/inherited_resources/base_helpers.rb:143:in `each'
View gist:f22b381ab71c4ac4576c
p = subprocess.Popen(["mysqldump", "--single-transaction", "-u",
database_username, "--password="+database_password, "--databases",
"--host", server_address, database_name, ],
stdout = open( outputfile, 'w') , stderr=subprocess.PIPE)
error = p.stderr.read()
p_ret = p.wait()
print "return code from mysqldump: " + str(p_ret)
if (len(error)) > 0:
action_error(error)
@deepeeess
deepeeess / gist:3dbf7a087a42373a6407
Last active Aug 29, 2015
detect hung passenger processes by inspecting an isolated application pool, iterating, and authing against the api
View gist:3dbf7a087a42373a6407
#!/bin/sh
#Isolate an application pool and iterate through and authenticate
#Written by Dan Sullivan
#Will detect hung processes
IFS=$'\n'
for i in $(rvmsudo passenger-status --verbose |
pcregrep -M '/opt(.|\n)*^/opt' |
grep -v Requests | grep -v ^/ |
grep -v "App root" | grep -v CPU |
View gist:6371c0ab2d72d555cd7c
<!DOCTYPE html>
<html>
<head>
<title>This shows how to get elements inside included svg images from the surrounding html.</title>
</head>
<body>
<object class="emb" data="images/svglogo.svg" width="100" height="100" type="image/svg+xml"></object>
<embed class="emb" src="images/svglogo.svg" width="100" height="100" type="image/svg+xml" />
<iframe class="emb" src="images/svglogo.svg" width="100" height="100" style="border:0" ></iframe>
<p>
View gist:5d8309046e5ec1ae55dd
<script>//<![CDATA[
window.addEventListener("load", configRainbow, false);
function configRainbow() {
var x=document.getElementById("rainy");
var bigstar;
if (x.contentDocument) {
var star1 = x.contentDocument.getElementById("star1");
var star2 = x.contentDocument.getElementById("star2");
var star3 = x.contentDocument.getElementById("star3");
var star4 = x.contentDocument.getElementById("star4");
View gist:fab7a4a1fc267f2610d7
[notroot@aaa-shelob03 ~]$ whoami
notroot
[notroot@aaa-shelob03 ~]$ \curl -sSL https://get.rvm.io | sudo bash -s stable
[sudo] password for notroot:
Downloading https://github.com/wayneeseguin/rvm/archive/1.26.9.tar.gz
Downloading https://github.com/wayneeseguin/rvm/releases/download/1.26.9/1.26.9.tar.gz.asc
gpg: Signature made Wed 07 Jan 2015 05:55:10 AM CST using RSA key ID BF04FF17
gpg: Good signature from "Michal Papis (RVM signing) <mpapis@gmail.com>"
gpg: WARNING: This key is not certified with a trusted signature!
@deepeeess
deepeeess / gist:0be3e80db9b21ce7b989
Created Feb 1, 2015
module dependency resolution
View gist:0be3e80db9b21ce7b989
angular.module('myApp', ['ngRoute', 'config']) ...
.controller('myController',['$scope', 'myApp', 'CONFIG', function($scope, myApp, CONFIG){
console.log("CONFIG " + CONFIG);
}
View gist:c1d8f3536ade65e8eb35
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
View gist:10e2af507cde4373adba
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@deepeeess
deepeeess / gist:fbe39890a3578f169ad7
Created Jul 30, 2015
braintree tokenizecard js
View gist:fbe39890a3578f169ad7
client.tokenizeCard({
number: $scope.ngTransaction.$transaction.cc,
cardholderName: cardholdername,
// You can use either expirationDate
expirationDate: "10/20",
// or expirationMonth and expirationYear
//expirationMonth: "10",
//expirationYear: "2015",
// CVV if required
//cvv: "832",
You can’t perform that action at this time.