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
/** | |
* @Method mt_chat_get_tvout_twitter_data | |
* @Desc | |
*/ | |
public function mt_chat_get_tvout_twitter_data( ) | |
{ | |
$twitter_app = $this->mysql->get_row("SELECT app_consumer_key, app_consumer_secret FROM tblTwitterApps WHERE app_id = 1"); | |
if( !is_null( $twitter_app ) ){ | |
$twitter_account = $this->mysql->get_row("SELECT oauth_token, oauth_token_secret FROM tblTwitterAccounts WHERE my_campaign_id = " . $this->mysql->escape( $this->post_data['my_campaign_id'] ) ); |
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
var WebSocket = require("socket.io").listen( 6969 ); | |
WebSocket.sockets.on("connection", ws_start); | |
function ws_start(data) | |
{ | |
data.on("new_message", ws_sendData); | |
} | |
function ws_sendData(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
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script src="http://mcnallydevelopers.no-ip.info:6969//socket.io/socket.io.js"></script> | |
<script> | |
var websocket = io.connect("http://mcnallydevelopers.no-ip.info:6969/"); | |
$(document).on("ready", open_ws); | |
function open_ws(){websocket.on("ws_getData", getMessage);} | |
function getMessage(data){$("#tweetrealtime").html('<a href="http://twitter.com/' + data.user.screen_name +'" target="_blank">' + data.user.screen_name + '</a>: ' + data.text);} | |
</script> | |
<div style="position:relative;overflow:hidden;margin:30px auto 0 auto;width:560px;background-color:#FFF;"> | |
<iframe width="560" height="315" src="http://www.youtube.com/embed/LNvh8PmMZwk" frameborder="0" allowfullscreen></iframe> |
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
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script src="http://mcnallydevelopers.no-ip.info:6969/socket.io/socket.io.js"></script> | |
<script> | |
var websocket = io.connect("http://mcnallydevelopers.no-ip.info:6969/"); | |
$(document).on("ready", open_ws); | |
function open_ws(){websocket.on("ws_getData", getMessage);} | |
function getMessage(data){$("#tweetrealtime").html('<a href="http://twitter.com/' + data.user.screen_name +'" target="_blank">' + data.user.screen_name + '</a>: ' + data.text);} | |
</script> | |
<div style="position:relative;overflow:hidden;margin:30px auto 0 auto;width:560px;background-color:#FFF;"> |
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
var WebSocket = require("socket.io").listen( 6969 ); | |
WebSocket.sockets.on("connection", ws_start); | |
function ws_start(data) | |
{ | |
data.on("new_message", ws_sendData); | |
} | |
function ws_sendData(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
IPADDR=x.x.x.x | |
BOOTPROTO=none | |
NETMASK=255.255.255.0 | |
GATEWAY=y.y.y.y | |
DNS1=y.y.y.y | |
DNS2=y.y.y.y | |
USERCTL=yes | |
HWADDR='your mac address' |
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
import tornado.httpserver | |
import tornado.ioloop | |
import tornado.web | |
import re | |
class MainHandler(tornado.web.RequestHandler): | |
def get(self): | |
sms_sender = self.get_argument("sms_sender", None) | |
sms_receiver = self.get_argument("sms_receiver", None) | |
sms_message = self.get_argument("sms_message", None) |
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 | |
/* backup the db OR just a table */ | |
function backup_tables($host,$user,$pass,$name,$tables = '*') | |
{ | |
$link = mysqli_connect($host,$user,$pass); | |
mysqli_select_db($name,$link); | |
//get all of the tables |
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
du -k | sort -n | perl -ne 'if ( /^(\d+)\s+(.*$)/){$l=log($1+.1);$m=int($l/log(1024)); printf ("%6.1f\t%s\t%25s %s\n",($1/(2**(10*$m))),(("K","M","G","T","P")[$m]),"*"x (1.5*$l),$2);}' |
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
CREATE TABLE tblArticles ( | |
article_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, | |
article_author TEXT NOT NULL, | |
article_category TEXT NOT NULL, | |
article_text TEXT NOT NULL, | |
article_title TEXT NOT NULL, | |
article_date TEXT NOT NULL, | |
article_image TEXT NOT NULL, | |
article_url TEXT NOT NULL | |
); |