Skip to content

Instantly share code, notes, and snippets.

View oleteacher's full-sized avatar
🏠
Working from home

Susan oleteacher

🏠
Working from home
View GitHub Profile
@oleteacher
oleteacher / chatgpt-prompt-template.json
Last active March 19, 2023 01:56
ChatGPT Prompt Template
[{"key": "as a song recommender", "value": "I want you to be a song recommender."] I will give you a song,You will create a playlist with 10 songs similar to the given song. You'll provide a playlist name and description for the playlist. Don't choose songs of the same name or the artist of the same name. Don't write any explanations or other text, just reply to the playlist name, description, and song. My first song was "Other Lives - Epic". "},{"key":" as a teacher of the history of mathematics","value": "I want you to act as a teacher of the history of mathematics, providing information about the historical development of mathematical concepts and the contributions of different mathematicians. You should only provide information, not solve mathematical problems. Answer using the following format: "{mathematicians/concepts} - {brief summary of their contribution/development}." My first question was "What was Pythagoras' contribution to mathematics?" "},{"key": "Play drunk", "value": "I want you to play a dr
@oleteacher
oleteacher / hosting-on-github.md
Last active February 23, 2023 05:31 — forked from TylerFisher/hosting-on-github.md
Basic steps for hosting on Github

Hey there, apparently people are still using this Gist from 2013! It's out of date! Consult the Github docs.

Steps for Hosting a Website on GitHub

  1. Create a GitHub account on github.com.
  2. Download either [GitHub for Mac][1] or [GitHub for Windows][2], depending on your operating system. Open the app and log in using the account you just created.
  3. (On Mac): After you login, click advanced and make sure that your name and email are correct. Then, click "Install Command Line Tools", just in case you want to start using the command line later in life.
  4. Create a new repository in your GitHub application. Name it your-username.github.io. The name is very important. Note the folder that GitHub is saving the repository to. Make sure the "Push to GitHub?" box is checked.
  5. Move your website's files into the folder that GitHub just created when you made the repository. IMPORTANT: Your homepage HTML file must be called "index.html", and it must exist in the top-level
@oleteacher
oleteacher / example.txt
Created January 5, 2023 21:49
dompdf example
<!DOCTYPE html>
<html>
<head>
<title>Convert HTML to PDF using DomPDF and PHP</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/5.2.3/morph/bootstrap.min.css">
</head>
<body>
<div class="container">
@oleteacher
oleteacher / flash.md
Created April 24, 2021 14:42 — forked from LiEnby/flash.md
Removing the timebomb from Adobe Flash Player

In Adobe Flash Player versions newer than 32.0.0.344 they added a "Timebomb" for the EOL. the player would refuse to run any custom flash content after 12/01/2021, instead it would just show this image

So knowing this, Lets crack it!

I acturally started looking into this before the 12/01/2021 hit, but only recently did i acturally discover a way to bypass the killswitch

(also- im aware i was not the first to do this, but i still did do it)

@oleteacher
oleteacher / getpath.php
Last active December 14, 2018 12:51
Function to get full server URL to directory
<?php
function url_part(){
$http=isset($_SERVER['HTTPS']) ? 'https://' : 'http://';
$part=rtrim($_SERVER['SCRIPT_NAME'],basename($_SERVER['SCRIPT_NAME']));
$domain=$_SERVER['SERVER_NAME'];
return "$http"."$domain"."$part";
}
?>
<?php echo url_part(); ?>
@oleteacher
oleteacher / curl_progress.php
Last active February 6, 2021 23:30 — forked from stuudmuffin/curl_progress.php
PHP/cURL File Download with Progress Bar #curl
<?php
//output buffer
ob_start();
//create javascript progress bar
echo '<html><head>
<script type="text/javascript">
function updateProgress(percentage) {
document.getElementById(\'progress\').value = percentage;
}
@oleteacher
oleteacher / openssl_encrypt_decrypt.php
Created February 1, 2018 14:53 — forked from joashp/openssl_encrypt_decrypt.php
Simple PHP encrypt and decrypt using OpenSSL
<?php
/**
* simple method to encrypt or decrypt a plain text string
* initialization vector(IV) has to be the same when encrypting and decrypting
*
* @param string $action: can be 'encrypt' or 'decrypt'
* @param string $string: string to encrypt or decrypt
*
* @return string
*/
@oleteacher
oleteacher / upandrename.php
Created January 28, 2018 22:36
Upload and Rename File Simple Version
<form action="" enctype="multipart/form-data" method="post">
<input id="file" name="file" type="file" />
<input id="Submit" name="submit" type="submit" value="Submit" />
</form>
<?php
// Upload and Rename File
if (isset($_POST['submit']))
@oleteacher
oleteacher / MySql2Sqlite.php
Last active February 23, 2023 04:47 — forked from ugoletti/MySql2Sqlite.php
MySql2Sqlite
#!/usr/bin/php
<?php
//https://github.com/oleteacher/mysql2sqlite
showMessage( "MySql2Sqlite v1.0" );
showMessage( "by Daniele Ugoletti" );
showMessage( "-------------------" );
// check the arguments
@oleteacher
oleteacher / index.html
Created April 17, 2017 00:52 — forked from 2braincells2go/index.html
Speech Recognition Web Speech
<div class="browser-landing" id="main">
<div class="compact marquee-stacked" id="marquee">
<div class="marquee-copy">
<h1>
<a class="c1" href="http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html">Web
Speech API</a> Demonstration
</h1>
</div>
</div>
<div class="compact marquee">