Skip to content

Instantly share code, notes, and snippets.

View rudmanmrrod's full-sized avatar
🔥
On fire coding!

Rodrigo Boet rudmanmrrod

🔥
On fire coding!
View GitHub Profile
@jayktaylor
jayktaylor / guide.md
Last active April 13, 2022 08:23
Instructions for installing Python 3.5 using pyenv on Debian Jessie

Installing Python 3.5 on Debian Jessie with pyenv

Debian Jessie does not come with the correct Python version out of the box, and instead comes with Python 2. To be able to install Python 3(.5), we have a few options. We could build and install from source, but as per Debian's website, we shouldn't do this. Instead, we will use pyenv, a tool that allows users to switch Python versions easily without breaking their system.

Installing pyenv

To install pyenv, we will use the official installer.

curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
@lalviarez
lalviarez / _form.php
Last active March 13, 2017 21:07
Yii2 combolist ajax
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use yii\helpers\Url;
use yii\web\View;
/* @var $this yii\web\View */
/* @var $model common\models\ConsejoComunal */
@cansadadeserfeliz
cansadadeserfeliz / forms.py
Created June 19, 2014 20:35
Django: pass a variable from a form view to a form
class MyForm(forms.ModelForm):
requested_asset = None
def __init__(self, *args, **kwargs):
other_variable = kwargs.pop('other_variable')
super(MyForm, self).__init__(*args, **kwargs)
@joecliff
joecliff / cryptojs_base64_encrypt_decrypt.js
Last active February 14, 2025 08:56
An example of base64 usage in cryptojs
var CryptoJS = require("crypto-js");//replace thie with script tag in browser env
//encrypt
var rawStr = "hello world!";
var wordArray = CryptoJS.enc.Utf8.parse(rawStr);
var base64 = CryptoJS.enc.Base64.stringify(wordArray);
console.log('encrypted:', base64);
//decrypt
var parsedWordArray = CryptoJS.enc.Base64.parse(base64);
@jo
jo / js-crypto-libraries.md
Last active May 4, 2025 22:08
List of JavaScript Crypto libraries.

JavaScript Crypto Libraries

List some crypto libraries for JavaScript out there. Might be a bit out dated. Scroll to the bottom.

WebCryptoAPI

http://www.w3.org/TR/WebCryptoAPI/

This specification describes a JavaScript API for performing basic cryptographic operations in web applications, such as hashing, signature generation and verification, and encryption and decryption. Additionally, it describes an API for applications to generate and/or manage the keying material necessary to perform these operations. Uses for this API range from user or service authentication, document or code signing, and the confidentiality and integrity of communications.