Skip to content

Instantly share code, notes, and snippets.

View snowdence's full-sized avatar
💭
....

Software Coder snowdence

💭
....
  • Ho Chi Minh
View GitHub Profile

AES-256 encryption and decryption in PHP and C#

Update: There is a more secure version available. Details

PHP

<?php

$plaintext = 'My secret message 1234';
@snowdence
snowdence / readme.md
Created July 11, 2023 11:20 — forked from ihabhamad/readme.md
Jetbrains IntelliJ Activation Code

For Subsciption until January 10, 2020

CATF44LT7C-eyJsaWNlbnNlSWQiOiJDQVRGNDRMVDdDIiwibGljZW5zZWVOYW1lIjoiVmxhZGlzbGF2IEtvdmFsZW5rbyIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiQUMiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEUE4iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQUyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiRE0iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJDTCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJTMCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJDIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiUkQiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQQyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJNIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiV1MiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEQiIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6I

@snowdence
snowdence / echo.js
Created August 18, 2022 08:52 — forked from bszwej/echo.js
Pure Node.js echo server, that logs all incoming http requests (method, path, headers, body).
const http = require('http');
const server = http.createServer();
server.on('request', (request, response) => {
let body = [];
request.on('data', (chunk) => {
body.push(chunk);
}).on('end', () => {
body = Buffer.concat(body).toString();
{
"version": "2.0.0.0",
"url": "https://snowdence.file.core.windows.net/upx03-28&sr=f&sig%3D",
"changelog": "https://snowdence.file.core.windows.net/upd-29T07%3A12%3A17Z&sp=rl&sv=2018-03-28&sr=f&sig=nLn2Vcs%%3D",
"force_update": false,
"mandatory": {
"value": false,
"minVersion": "1.0.0.1",
"mode": 1
},
@snowdence
snowdence / UIChannelItem.tsx
Created August 24, 2021 16:35 — forked from ladifire/UIChannelItem.tsx
UIChannelItem.tsx by Ladifire & Cong Nguyen
/**
* Copyright (c) Ladifire, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import {Pressable} from '@ladifire-ui-react/tetra-button';
@snowdence
snowdence / postman-pre-request.js
Created May 15, 2021 19:25 — forked from bcnzer/postman-pre-request.js
Postman pre-request script to automatically get a bearer token from Auth0 and save it for reuse
const echoPostRequest = {
url: 'https://<my url>.auth0.com/oauth/token',
method: 'POST',
header: 'Content-Type:application/json',
body: {
mode: 'application/json',
raw: JSON.stringify(
{
client_id:'<your client ID>',
client_secret:'<your client secret>',
@snowdence
snowdence / conversion.cpp
Created June 17, 2020 14:16 — forked from pezy/conversion.cpp
Encoding Conversion In C++
// Convert a wide Unicode string to an UTF8 string
std::string utf8_encode(const std::wstring &wstr)
{
int size_needed = WideCharToMultiByte(CP_UTF8, 0, &wstr[0], (int)wstr.size(), NULL, 0, NULL, NULL);
std::string strTo(size_needed, 0);
WideCharToMultiByte(CP_UTF8, 0, &wstr[0], (int)wstr.size(), &strTo[0], size_needed, NULL, NULL);
return strTo;
}
// Convert an UTF8 string to a wide Unicode String

Keybase proof

I hereby claim:

  • I am snowdence on github.
  • I am snowdence (https://keybase.io/snowdence) on keybase.
  • I have a public key ASBQNprzFqOb8QsKXdqNEmkm9KuagytEnX-mwjmEPSWpnAo

To claim this, I am signing this object: