Skip to content

Instantly share code, notes, and snippets.

View christophernarciso's full-sized avatar
🌎
Working from home

Christopher Narciso christophernarciso

🌎
Working from home
View GitHub Profile
@ricardozea
ricardozea / Smooth scroll to top of page.markdown
Last active May 12, 2024 12:12
Smooth scroll to top of page

Visit the new improved script here! Smooth scroll to top of page (Improved!)


Smooth scroll to top of page (Legacy!)

If you need a plain JavaScript function to add a smooth scrolling back to the top of the page, you can use this script.

  1. Add an id of "top" to the <body> tag. Like this: <body id="top">
  2. Add the onclick function to the link. Like this: <a href="#top" onclick="scrollToTop(); return false">Back to Top ↑</a>
@thomasdarimont
thomasdarimont / AesCipher.php
Last active June 18, 2022 03:59
Example for 128bit AES with Java and PHP
<?php
class AesCipher {
private const OPENSSL_CIPHER_NAME = "aes-128-cbc";
private const CIPHER_KEY_LEN = 16; //128 bits
private static function fixKey($key) {
if (strlen($key) < AesCipher::CIPHER_KEY_LEN) {
@christophernarciso
christophernarciso / install.sh
Last active June 27, 2018 21:48
Debian 8 OSbot
# Update debian
apt-get update -q -y
apt-get upgrade -q -y
apt-get dist-upgrade -q -y
# Incase debian fails to install
mkdir /dev/fuse
chmod 777 /dev/fuse
apt-get install fuse