Skip to content

Instantly share code, notes, and snippets.

Avatar
🧸
teddygang

Laim

🧸
teddygang
View GitHub Profile
@Laim
Laim / add_image.php
Created Sep 30, 2016
i was tired and made this and i decided to use it but i really need to change it, soz whoever sees this
View add_image.php
<?php
if($get_image) {
if(strpos($get_image, '.png') == true) {
$get_image = str_replace('.png','',$get_image);
}
if($image_functions->get_image_for_check($get_image) == 'false') {
@Laim
Laim / post.php
Created Nov 21, 2018
How not to do it
View post.php
<?php
//MAIN CONFIGURATION
require_once(dirname(__FILE__) . "/include/configuration.php");
//DATABASE
require_once(dirname(__FILE__) . "/include/db/conn.php");
require_once(dirname(__FILE__) . "/include/db/func.php");
$sb = new susboy($pdo);
View bug.frm
Sub CreateAfile()
Call ImageCreate
''FILE 1 START''
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile(App.Path & "\data\animals\" & txtBugName.Text & "\antenna.txt", True)
a.WriteLine ("N/A")
a.Close
''FILE 1 END''
''FILE 2 START''
Set fs = CreateObject("Scripting.FileSystemObject")
View Viewer.frm
VERSION 5.00
Begin VB.Form ProViewer
BorderStyle = 1 'Fixed Single
Caption = "Form1"
ClientHeight = 7695
ClientLeft = 45
ClientTop = 375
ClientWidth = 6015
LinkTopic = "Form1"
MaxButton = 0 'False
@Laim
Laim / lyrics.php
Created Jan 21, 2019
TWNPLY lyrics page
View lyrics.php
<!DOCTYPE html>
<head>
<title>Lyrics Database</title>
</head>
<body>
<?php
error_reporting(0);
$artist_original = $_GET['artist'];
$song_original = $_GET['song'];
//
@Laim
Laim / mod.php
Created Feb 1, 2019
MyHomeBoardPHP - mod page
View mod.php
<?php
require("../include/configuration.php");
require("../include/helper.php");
require("../include/db/conn.php");
require("../include/db/func.php");
$home = new MyHomeBoardPHP($pdo);
if(isset($_GET['action']) && isset($_GET['id']) && isset($_GET['type'])){
$type = htmlentities($_GET['type']);
View #4.html
<script>
function SearchEnabled() {
if(document.getElementById("ext_search_txt").value==="") {
document.getElementById('ext_search').disabled = true;
} else {
document.getElementById('ext_search').disabled = false;
}
}
</script>
@Laim
Laim / form.vb
Last active Oct 24, 2019
Get Subkeys in registry
View form.vb
Imports YourApp.Registry
Public Class frmMain
Private Sub btnRegGet_Click(sender As Object, e As EventArgs) Handles btnRegGet.Click
Try
lbKeys.Items.Clear()
For Each i In getKeys("SOFTWARE\Google")
lbKeys.Items.Add(i.ToString)
Next
@Laim
Laim / style.css
Created Dec 29, 2019
Dark Mode based on System
View style.css
body {
font-family: monospace;
background-color: #1d1f21;
color: #FFF;
}
a:link {
text-decoration:none;
color:#CC3300;
}
View api.trakt.php
<?php
$user = "laim";
$key = "";
$type = "history"; //history or watching
// You need to register an API app here https://trakt.tv/oauth/applications to get the API Key (ClientID)
function traktAPI($user, $key, $type) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.trakt.tv/users/$user/$type");