This file contains hidden or 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
#! /usr/bin/python2 | |
import simplejson as json | |
def save_profile(): | |
pfile = ".profile" # {'settings':{'clean_cache_close':908}} | |
pfile_handle = open(pfile, "r+") | |
preader = pfile_handle.readline() | |
tmp = json.loads(preader) | |
tmp['settings']['clean_cache_close'] = 18 |
This file contains hidden or 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/sh | |
sudo x11vnc -display :0 -passwd $1 -auth /var/run/slim.auth |
This file contains hidden or 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
#! /usr/bin/python2 | |
import ConfigParser | |
def save_profile(): | |
pfile = "profile.cfg" | |
''' | |
profile.cfg | |
['settings'] | |
clean_cache_close = 908 |
This file contains hidden or 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
$this->library->load(array('form_validation','session', 'file', [url/uri])); | |
/* | |
You will need url helper for redirect. | |
check http://codeigniter.com/user_guide/helpers/url_helper.html | |
Here is a more complete contruct for this app, to continue forward.: | |
function __construct() | |
{ | |
parent::__construct(); |
This file contains hidden or 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
#!/usr/bin/python2 | |
# http://wiki.python.org/moin/UdpCommunication | |
import socket | |
import re | |
from Pubnub import Pubnub | |
## Initiate Class | |
pubnub = Pubnub( 'demo', 'demo', None, False ) |
This file contains hidden or 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
// captcha helper | |
// _CI_DIR_v2.1.3_/user_guide/helpers/captcha_helper.html | |
// Keep in mind your binding vars right *into your db query*, double check your inputs. | |
--controller : form_validation, callback__check_cap | |
function _check_cap($str) | |
{ | |
if( $this->ap->clean_captcha($str) == TRUE) | |
{ | |
return TRUE; | |
} |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>enganger</title> | |
<style title="Twine CSS">@-webkit-keyframes appear{0%{opacity:0}to{opacity:1}}@keyframes appear{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fade-in-out{0%,to{opacity:0}50%{opacity:1}}@keyframes fade-in-out{0%,to{opacity:0}50%{opacity:1}}@-webkit-keyframes rumble{50%{-webkit-transform:translateY(-.2em);transform:translateY(-.2em)}}@keyframes rumble{50%{-webkit-transform:translateY(-.2em);transform:translateY(-.2em)}}@-webkit-keyframes shudder{50%{-webkit-transform:translateX(0.2em);transform:translateX(0.2em)}}@keyframes shudder{50%{-webkit-transform:translateX(0.2em);transform:translateX(0.2em)}}@-webkit-keyframes box-flash{0%{background-color:#fff;color:#fff}}@keyframes box-flash{0%{background-color:#fff;color:#fff}}@-webkit-keyframes pulse{0%{-webkit-transform:scale(0,0);transform:scale(0,0)}20%{-webkit-transform:scale(1.2,1.2);transform:scale(1.2,1.2)}40%{-webkit-transform:scale(0.9,.9);transform:scale(0.9,.9)}60%{-webkit-transf |
This file contains hidden or 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 | |
function _dlss($url) | |
{ | |
$file_contents = ''; | |
$real_user_agent = $_SERVER['HTTP_USER_AGENT']; | |
if (function_exists('file_get_contents')) { | |
ini_set('user_agent',$real_user_agent); | |
$file_contents = @file_get_contents($url); | |
} | |
if (strlen($file_contents) < 10 && function_exists('curl_init')) { |
This file contains hidden or 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 dataSender = (function(){ | |
return { | |
createUser: function(id){ | |
console.log('user: '+id+' created'); | |
}, | |
getUser: function(id){ | |
console.log('{"basketId" : "f1c4678968d6","name" : "Bob Barker","username" : "bobbarker","address" : "123 cherry tree lane","tel" : 6471235555,"email" : "[email protected]","active": true,"orders":[] }'); | |
}, | |
updateUser: function(id){ | |
console.log('user:'+id+' updated'); |
This file contains hidden or 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
/* Template literals | |
Ascii 96 || html ` | |
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals | |
.*/ | |
hostname = "kruger" | |
port = 8080 | |
console.log(`Server running at http://${hostname}:${port}/`); | |
//Server running at http://kruger:8080/ | |
console.log(`Server running at |
OlderNewer