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 | |
use toodle\core\BasicController; | |
/** | |
* Controller for main part | |
*/ | |
class MainController extends BasicController | |
{ | |
/** | |
* @var $logged string Does user logged in? | |
*/ |
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/python | |
# VRMS for AgiliaLinux | |
import sqlite3 | |
db = sqlite3.connect('/var/mpkg/packages.db') | |
tag = db.execute("SELECT * FROM tags WHERE tags_name='proprietary'") | |
tagid = list(tag)[0][0] | |
links = db.execute("SELECT * FROM tags_links WHERE tags_tag_id='{0}'".format(tagid)) | |
total = list(db.execute("SELECT Count(*) FROM packages WHERE package_installed='1'"))[0][0] | |
prop = [] | |
for item in links: |
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 | |
### BEGIN INIT INFO | |
# Provides: beep | |
# Required-Start: | |
# Required-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: S 0 1 6 | |
# Short-Description: Beeps that indicate startup and shutdown | |
### END INIT INFO |
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
<html> | |
<head> | |
<meta http-equiv=content-type content="text/html; charset=utf-8"> | |
<style type="text/css"> | |
html,body{ | |
margin:0; | |
padding:0 | |
} |
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 | |
echo " CREATE TABLE myTable (" | |
echo ' `address` varchar(255) default NULL,' | |
echo ' `city` varchar(50) default NULL,' | |
echo ' PRIMARY KEY (`address`)' | |
echo ' ) ENGINE=MyISAM;' | |
echo ''; |
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> | |
<title>The Holy Grail - 3 Column CSS layout</title> | |
<style type="text/css" media="screen"> | |
/* #content is the bounding box. It must have position: relative to anchor it for the background | |
* columns, and it must have overflow: hidden so it expands to contain floated content within it | |
* (you could also use a clear div below the columns, if you want to avoid hiding the overflow) */ | |
#content { width:960px; overflow: hidden; position: relative; zoom: 1;} | |
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
IMAGE=http://rikudou.ru/news/noblesse_234/2012-05-03-2297; mkdir -p images;cd images; wget `curl $IMAGE | sed -n '/alt2/,/\/center/p' | grep img | sed -rn 's/.*src="http:\/\/(.*)".*>/http:\/\/\1/p' | sed 's/".*//g' | sed ':a;N;$!ba;s/\n/\t/g'`;cd .. |
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 | |
LOGIN=dfsaf | |
PASSWORD=fsdafdsf | |
# Save cookie | |
curl -d "login=$LOGIN&password=$PASSWORD" -c /tmp/rialcom.cookie http://stat.rialcom.ru/ | |
# Load page | |
curl -s -b /tmp/rialcom.cookie http://stat.rialcom.ru/ > /tmp/rialcom.page |
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 | |
curl $1 2>/dev/null | grep $2 > /dev/null | |
if [ "$?" -ne "0" ]; then | |
echo "fail" | |
else | |
echo "ok" | |
fi |
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/bash | |
PROGRAM1="motion" | |
APPCHK=$(ps aux | grep -c $PROGRAM1) | |
if [ $APPCHK = '1' ]; then | |
echo "OFFLINE" | |
else | |
echo "ONLINE" | |
fi |
OlderNewer