Skip to content

Instantly share code, notes, and snippets.

View schmidt1024's full-sized avatar

Schmidt schmidt1024

View GitHub Profile
@schmidt1024
schmidt1024 / .htaccess
Created December 1, 2023 09:48
Wordpress htaccess performance booster
# Redirect http to https
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
# Browser Caching
<IfModule mod_expires.c>
ExpiresActive On
@schmidt1024
schmidt1024 / SoliditySnippets.sol
Last active September 15, 2023 06:09
Basic Solidity Snippets for Smart Contracts
/**
* @title Solidity Snippets
* @author Alexander Schmidt
* @notice Smart Contract Bootcamp
*/
/**
* Table of Content
*
* Constructor
@schmidt1024
schmidt1024 / app.ini
Created May 16, 2023 14:58
gitea config
; This file lists the default values used by Gitea
; Copy required sections to your own app.ini (default is custom/conf/app.ini)
; and modify as needed.
; see https://docs.gitea.io/en-us/config-cheat-sheet/ for additional documentation.
; App name that shows in every page title
APP_NAME = My VCS
; Change it if you run locally
RUN_USER = git
@schmidt1024
schmidt1024 / index.php
Last active February 7, 2023 08:00
Simple boilerplate for a Joomla template
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
</head>
<body>
<jdoc:include type="message" />
<jdoc:include type="component" />
<jdoc:include type="modules" name="debug" />
@schmidt1024
schmidt1024 / erc20-token-as-coin-example.sol
Last active January 21, 2023 08:34
Ethereum ERC20 Smart Contract - Beispiel eines Token, der als eigener Coin funktioniert
// Dieser Smart Contract erstellt einen Token mit dem Namen "My Token",
// dem Symbol "MYT" und 18 Dezimalstellen. Die Gesamtmenge des Token
// wird auf 100000000 festgelegt und der Besitzer des Smart Contracts
// wird automatisch als Besitzer des Token gesetzt.
// Der Smart Contract enthält auch die Funktionen "transfer", "approve"
// und "transferFrom", die es ermöglichen, Token an andere Adressen zu
// senden, die Übertragung von Token zu genehmigen und Token von einer
// Adresse auf eine andere zu übertragen.
@schmidt1024
schmidt1024 / html-js-notification.html
Created October 13, 2022 08:39
HTML JavaScript Notification
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Notification Test</title>
</head>
<body>
<button id="btn">Test</button>
This file has been truncated, but you can view the full file.
123456
password
12345678
qwerty
123456789
12345
1234
111111
1234567
dragon
@schmidt1024
schmidt1024 / languages.sql
Created May 15, 2021 13:57
SQL dump of common languages of the world
CREATE TABLE `common_languages` (
`id` int(11) NOT NULL,
`language_code` varchar(10) NOT NULL,
`language_name` varchar(100) NOT NULL,
`status` varchar(255) NOT NULL DEFAULT 'draft'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `common_languages` (`id`, `language_code`, `language_name`, `status`) VALUES
(1, 'af', 'Afrikaans', ''),
@schmidt1024
schmidt1024 / continents.sql
Created May 13, 2021 08:30
SQL insert of continents incl. short codes
CREATE TABLE `common_continents` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` char(2) NOT NULL DEFAULT '',
`name` varchar(30) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
insert into common_continents (code,name) values ('AF','Africa');
insert into common_continents (code,name) values ('AN','Antarctica');
insert into common_continents (code,name) values ('AS','Asien');
@schmidt1024
schmidt1024 / ch-kantone.sql
Last active May 13, 2021 08:17
SQL insert of swiss states aka Kantone incl. short codes
CREATE TABLE `common_ch_kantone` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` char(2) NOT NULL DEFAULT '',
`name` varchar(30) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
insert into common_ch_kantone (code,name) values ('AG','Aargau');
insert into common_ch_kantone (code,name) values ('AR','Appenzell Ausserrhoden');
insert into common_ch_kantone (code,name) values ('AI','Appenzell Innerrhoden');