Skip to content

Instantly share code, notes, and snippets.

View Laim's full-sized avatar
🧸
jeff

Laim

🧸
jeff
View GitHub Profile
@Laim
Laim / add_image.php
Created September 30, 2016 15:19
i was tired and made this and i decided to use it but i really need to change it, soz whoever sees this
<?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 November 21, 2018 20:15
How not to do it
<?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);
@Laim
Laim / bug.frm
Created December 23, 2018 00:03
vb6
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")
@Laim
Laim / Viewer.frm
Created December 23, 2018 00:05
vb6
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 January 21, 2019 00:43
TWNPLY lyrics page
<!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 February 1, 2019 19:09
MyHomeBoardPHP - mod page
<?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']);
@Laim
Laim / #4.html
Created February 21, 2019 17:25
<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 October 24, 2019 18:58
Get Subkeys in registry
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 December 29, 2019 14:22
Dark Mode based on System
body {
font-family: monospace;
background-color: #1d1f21;
color: #FFF;
}
a:link {
text-decoration:none;
color:#CC3300;
}
<?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");