Skip to content

Instantly share code, notes, and snippets.

<?php
function dimox_breadcrumbs() {
/* === OPTIONS === */
$text['home'] = 'Home'; // text for the 'Home' link
$text['category'] = 'Archive by Category "%s"'; // text for a category page
$text['search'] = 'Search Results for "%s" Query'; // text for a search results page
$text['tag'] = 'Posts Tagged "%s"'; // text for a tag page
$text['author'] = 'Articles Posted by %s'; // text for an author page
@nvg58
nvg58 / portal.py
Last active August 29, 2015 14:11
import requests
host = 'http://dangkyhoc.daotao.vnu.edu.vn/dang-nhap'
#studentID = ''
#passw = ''
def check(studentID, passw):
payload = {'LoginName': studentID, 'Password': passw, '__RequestVerificationToken': 'e4dBmzKQN245hMpLnjwX19efdikITAR39gf7dl1WjKk-PVrQ1WxdcQxjYJTf8N8JsecCb5QnIsr4VGSKQr8N51vUlkk1'}
@nvg58
nvg58 / ymltosql.php
Last active May 4, 2023 11:18
Convert YML to MySQL
<?php
// Modified from http://sumanrs.wordpress.com/2012/02/23/yaml-to-mysql-yaml2sql-script-in-php
// Connect SQL
$servername = "localhost";
$username = "root";
$password = "root";
$database = "test";
// Create connection
@nvg58
nvg58 / install_mysql.sh
Created November 12, 2015 09:45 — forked from rrosiek/install_mysql.sh
Vagrant provision script for php, Apache, MySQL, phpMyAdmin, Laravel, and javascript helpers. Outputs nearly everything to /dev/null since "quiet" on most commands is still noisy.
#! /usr/bin/env bash
# Variables
APPENV=local
DBHOST=localhost
DBNAME=dbname
DBUSER=dbuser
DBPASSWD=test123
echo -e "\n--- Mkay, installing now... ---\n"