$ openssl genrsa -des3 -out root.key 4096
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import openai | |
import readline | |
from datetime import date | |
from dotenv import load_dotenv | |
load_dotenv() | |
openai.api_key = os.getenv('OPENAI_API_KEY') | |
assistant_name = "Assistant" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const moment = require('moment-timezone'); | |
// parse time with timezone, convert to UTC, resulting object is in UTC | |
console.log(moment.utc('23:05+02:00', ['hh:mm a ZZ', 'HH:mmZZ'], true).format()); | |
// parse time with timezone, resulting object is in timezone specified in the time string | |
console.log(moment.parseZone('23:05+02:00', ['hh:mm a ZZ', 'HH:mmZZ'], true).format()); | |
// parse time with timezone, resulting object is converted to timezone specified in the timezone parameter | |
console.log(moment.tz('23:05+02:00', ['hh:mm a ZZ', 'HH:mmZZ'], 'America/Vancouver').format()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hey there. My name is Eli Finer. | |
Welcome to Wuju. | |
These are difficult times in India. There is fear, uncertainty and doubt everywhere. Hospitals are running out of critical supplies. Many people are sick and some are dying. And yet there is light as well. The Indian people are coming together, helping each other harnessing resources and working to resolve the situation with fierce determination. | |
Any difficulty we face can be made worse or better, depending on the quality of our thoughts. Negative, self-defeating thoughts make every challenge seem impossible. They drain our energy and limit our options. Positive or clear thinking can help us see new ways to improve our situation. It can help us find compassion for ourselves and for others and even improve the way our bodies deal with disease. | |
We can't change how we feel and what we think directly. Trying to do this through sheer force of will usually results in self judgment, shame and guilt. And that only adds to the already full arsenal of negative think |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Quotes = [ | |
{ | |
"text":"You don't fail until you stop trying.", | |
"from":"Albert Einstein" | |
}, | |
{ | |
"text":"I failed my way to success.", | |
"from":"Thomas Edison" | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$options = [ | |
'a' => [1,2], | |
'b' => [1,2,3], | |
]; | |
function cartesian($array) | |
{ | |
if ($array) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// RG: Stubs to make wp-login.php run independently of Wordpress codebase on modern PHP. | |
error_reporting(0); | |
$_REQUEST['action'] = $_REQUEST['action'] ?? ''; | |
class wpdb { | |
public $users; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(cat .env.default .env | sed 's/^/export /'; echo env) | env -i bash - | grep -v SHLVL | grep -v ^_ | grep -v PWD | sort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<style> | |
.div1 { | |
position: relative; | |
display: inline-block; | |
border: 1px solid #ccc; | |
} | |
.div1::after { | |
content: ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (count($argv) < 4) { | |
echo " | |
Usage: php pivot.php <file> <column>[,<column>] <column>:<func> | |
Examples: | |
php pivot.php data.csv Type sum:Amount | |
php pivot.php data.csv Type,Description sum:Amount | |
"; |
NewerOlder