This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"_index": "http-access-2015.08.28", | |
"_type": "fluentd", | |
"_id": "AU91sX8H3fvMhMs_8892", | |
"_score": null, | |
"_source": { | |
"remote": "45.55.237.56", | |
"host": "-", | |
"user": "-", | |
"method": "\\x16\\x03\\x01\\x010\\x01\\x00\\x01,\\x03\\x03\\x18\\x1B\\x85\\xAA\\x81\\xA7\\x91\\x1F\\xDA\\xCA1rg+\\xB0\\x1F\\x94\\xF3\\xE9\\x03\\xB5\\x80$g*\\x18\\xEFeAv\\xDES\\x00\\x00\\x96\\xC00\\xC0,\\xC0(\\xC0$\\xC0\\x14\\xC0", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include('HelpSpotAPI.php'); | |
$hsapi = new HelpSpotAPI(array( | |
'helpSpotApiURL' => 'http://.../api/index.php', // Your credentials as normal | |
'username' => 'todd@company.com', | |
'password' => 'pass' | |
)); | |
// Your normal activites here to bulid the $helpspot_request array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sql_query = SELECT topic_id, topic FROM topics | |
# joined/payload field fetch query | |
# joined fields let you avoid (slow) JOIN and GROUP_CONCAT | |
# payload fields let you attach custom per-keyword values (eg. for ranking) | |
sql_joined_field = post from query; \ | |
SELECT topic_id, post \ | |
FROM posts \ | |
ORDER BY topic_id ASC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print "This is whatever" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
/usr/bin/mysqldump --user=DB_USER --password='DB_PASSWORD' --databases DB_NAME | gzip > /path/to/backup/DB_NAME-`date +%Y%m%d%H%M`.sql.gz | |
find /path/to/backup -name "*.gz" -mtime +60 -exec /bin/rm {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
remoteuser=user_name | |
remotecomputer=some_ip_address | |
ssh -l "$remoteuser" "$remotecomputer" "tail -f path/to/log/files/log-`date +"%Y-%m-%d"`.php" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//See more http://code.google.com/apis/youtube/2.0/developers_guide_protocol_api_query_parameters.html | |
$.ajax({ | |
type:'GET', | |
dataType:'jsonp', | |
//url:'http://gdata.youtube.com/feeds/users/USERNAME/uploads?alt=json', //also usable, but less awesome | |
url:'http://gdata.youtube.com/feeds/api/videos', | |
data:{author:'USERNAME', v:2, orderby:'published', alt:'json', 'max-results':10}, | |
success:function(data, textStatus, XMLHttpRequest) { | |
console.log(data); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
var environment = {}; | |
var methods = { | |
init:function(options) { | |
var options = $.extend({}, options); | |
return this.each(function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap | |
{ | |
protected function _initLayoutHelper() | |
{ | |
$this->bootstrap('frontController'); | |
$layout = Zend_Controller_Action_HelperBroker::addHelper( | |
new AppName_Controller_Action_Helper_LayoutLoader()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
type:'GET', | |
dataType:'jsonp', | |
url:'http://api.twitter.com/1/statuses/user_timeline.json', | |
data:{screen_name:'USERNAME', include_rts:1}, //show retweets | |
success:function(data, textStatus, XMLHttpRequest) { | |
var tmp = false; | |
var results = $('#twitter_results'); | |
//console.log(data); | |
for(i in data) { |
OlderNewer