Skip to content

Instantly share code, notes, and snippets.

View simeondahl's full-sized avatar
😼
Working from home

Simeon Dahl simeondahl

😼
Working from home
View GitHub Profile
@simeondahl
simeondahl / login.py
Created June 14, 2014 14:52
PythonLogin
neededPassword = "8513"
maxLogins = 3
userLoginAttempts = 0
def Login(password):
global maxLogins
global neededPassword
global userLoginAttempts
userInputPassword = raw_input("Enter Password: ")
@simeondahl
simeondahl / index.php
Last active December 23, 2015 06:29
This is my CMS
<?php
/**
* This script is made by Simeon L. Dahl
*/
include ( 'settings.php' );
@simeondahl
simeondahl / config.php
Last active December 12, 2015 03:28
Just a small website
<?php
////
// Site Config
//
$cfg_site_enabled = true; // Set to false if you are updating your site
$cfg_site_title = "My Website"; // Set the TITLE on your webpage
if ($cfg_site_enabled == false)
{
@simeondahl
simeondahl / config.php
Created January 9, 2013 21:55
Secure MySQL-connect script.
<?php
// Mysql settings
$mysql['enabled'] = true; // Enable MySQL
$mysql['host'] = "localhost"; // Host
$mysql['user'] = "root"; // Username
$mysql['pass'] = "1234"; // Password
$mysql['db'] = "my_base"; // Database
?>
@simeondahl
simeondahl / ChangeLog.txt
Last active December 10, 2015 19:48
My Function
0.1.8 -> 0.1.9
general:
- Updated all the old PHP 4 to PHP 5 tags
- Updated security to secure a MySQL injection
--------------------------------------------------------------------------------------------------
0.1.7 -> 0.1.8
general:
- Added a frew ON and OFF (defrines)
--------------------------------------------------------------------------------------------------
0.1.6 -> 0.1.7
@simeondahl
simeondahl / ChangeLog 0.0.2.txt
Last active December 10, 2019 23:00
PHP dropdown menu.
0.0.1 -> 0.0.2
general:
- Removed PHP code from index.php
- Added a new file with php code in called "function.php"
0.0.1
general:
- Added the new code to get value of a dropdown box (PHP)
@simeondahl
simeondahl / ChangeLog 0.0.2.txt
Last active December 10, 2015 18:39
A connect to mysql system.
0.0.1 -> 0.0.2
general:
- New function to show or hide the disabled message
- Added a comment in "mysql.php"
0.0.1
general:
- New function to disable/enable website frontpage
- Fixed a frew bugs
- Fixed comments on "config.php" and "mysql.php"
@simeondahl
simeondahl / main.cpp
Last active December 10, 2015 18:38
A Windows (+) calculator. In C++
#include <osteam>
using namespace std;
int add(x,y)
{
return x + y;
}
int main()
{
@simeondahl
simeondahl / gist:4476321
Created January 7, 2013 16:29
Created the file.
<?php
//
// If this is enabled it will do a function
//
$enabled = true;
$web_mail = "example@gmail.com" //Set your webmaster mail here
if ($enabled == true) {
//set function here
} else {