Skip to content

Instantly share code, notes, and snippets.

View d30jeff's full-sized avatar
💭
Eating caviar and hacking famine

Deojeff d30jeff

💭
Eating caviar and hacking famine
View GitHub Profile
@d30jeff
d30jeff / test.php
Created April 10, 2015 16:05
Section
<?php
$link = new mysqli('localhost','root','','test2');
$SQL = "SELECT DISTINCT class FROM TEST";
$query = $link->query($SQL);
while ( $row = $query->fetch_assoc() ) {
$classes[] = $row['class'];
}
@d30jeff
d30jeff / *.txt
Created April 14, 2015 13:28
default
server {
listen 8080 default_server;
listen [::]:8080 default_server ipv6only=on;
root /var/www/;
index index.php index.html index.htm;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
@d30jeff
d30jeff / test.py
Created April 25, 2015 03:34
Why the hell won't this work
with open('test.txt') as f:
mylist = [x.strip('\n') for x in f.readlines()]
for word in mylist:
word_length = len(word)
lower_case = 0
for w in word:
if w.islower():
lower_case += 1
@d30jeff
d30jeff / test.html
Created May 13, 2015 04:37
Bootstrap
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
</head>
<body>
<div class="page-header">
<h1>Monserver <small>Monserver system</small></h1>
@d30jeff
d30jeff / list.txt
Created May 17, 2015 09:10
Listing for mudah
No:1
Name: Gan
Number: 0163049602
Location: Sabah - Penampang
No:3
Name: sam
Number: 0195825331
Location: Sabah - Kunak
@d30jeff
d30jeff / NoseTest.py
Created May 20, 2015 06:55
Nose Test
import requests, json
from func import *
from login import *
from customer import *
from tax import *
# Objects
main = Main('auth')
customer = Customer('customers')
<?php
if ( isset($_GET['action'])){
$action = $_GET['action'];
switch($action){
case "process":
$start_date = $_POST['start_date'];
$end_date = $_POST['end_date'];
<?php
function validation(){
$dbServer = 'localhost';
$dbUserName = 'root';
$dbPassword = '';
$dbName = 'DBeoi';
$eoinumber = $_POST["eoinumber"];
$lastname = $_POST["lastcheck"];
<?php
function validation(){
$dbServer = 'localhost';
$dbUserName = 'root';
$dbPassword = '';
$dbName = 'DBeoi';
if (isset($_POST['eoinumber'],$_POST['lastcheck'])){
$eoinumber = $_POST['eoinumber'];
<?php
$sql = "SELECT COUNT(id) as count FROM eoi";
$query = $dbConx->query($sql);
$row = $query->fetch_assoc();
$count = $row['count']
echo $count;