Skip to content

Instantly share code, notes, and snippets.

@macintoxic
macintoxic / CpfCnpjUtils.cs
Last active November 6, 2023 04:43
Classe com métodos para validação de CPF e CNPJ utilizando Linq
/// <summary>
/// Classe com métodos para validação de CPF e CNPJ utilizando Linq
/// </summary>
public static class CpfCnpjUtils
{
private static readonly int[] Multiplicador1Cnpj = { 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2 };
private static readonly int[] Multiplicador2Cnpj = { 6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2 };
private static readonly int[] Multiplicador1Cpf = { 10, 9, 8, 7, 6, 5, 4, 3, 2 };
private static readonly int[] Multiplicador2Cpf = { 11, 10, 9, 8, 7, 6, 5, 4, 3, 2 };
@macintoxic
macintoxic / test_autogen.py
Created October 29, 2023 05:52
Testing autogen
from autogen import AssistantAgent, UserProxyAgent, GroupChat, GroupChatManager, ChatCompletion, retrieve_utils
### Default data and functions:
def write_file(file_name, file_content):
with open(file_name, "w") as file1:
file1.writelines(file_content)
function_map_definition = []
metropolis
rock horror show
a meia noite levarei sua alma
night of living deads
The Visit
Devil
Delicatessen
Barry London
Cape Fear
Soylent Green
0xa76d458210b5b335eee20f8393f0b07574a8ac71
using System;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
using System.Runtime.InteropServices;
using System.Windows.Threading;
class Program
{
// DESKTOP_ACCESS
## Based on: http://code.activestate.com/recipes/577654/
#!/usr/bin/env python
# Send DDE Execute command to running program
from ctypes import POINTER, WINFUNCTYPE, c_char_p, c_void_p, c_int, c_ulong, c_char_p
from ctypes.wintypes import BOOL, DWORD, BYTE, INT, LPCWSTR, UINT, ULONG
import time
# DECLARE_HANDLE(name) typedef void *name;
HCONV = c_void_p # = DECLARE_HANDLE(HCONV)

Keybase proof

I hereby claim:

  • I am macintoxic on github.
  • I am macintoxic (https://keybase.io/macintoxic) on keybase.
  • I have a public key ASDGDz5y_SedcfZukSjXZtGnhZBRNEyhEHAm5nryXiC8sAo

To claim this, I am signing this object:

<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="1;url=http://medium.com">
<script type="text/javascript">
window.location.href = "http://medium.com"
</script>
<title>Page Redirection</title>
</head>
@macintoxic
macintoxic / base64.js
Created March 31, 2016 03:17 — forked from whatnickcodes/base64.js
How to Encode and Decode Strings with Base64 in JavaScript
// Create Base64 Object
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f<e.length){n=e.charCodeAt(f++);r=e.charCodeAt(f++);i=e.charCodeAt(f++);s=n>>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(f<e.length){s=this._keyStr.indexOf(e.charAt(f++));o=this._keyStr.indexOf(e.charAt(f++));u=this._keyStr.indexOf(e.charAt(f++));a=this._keyStr.indexOf(e.charAt(f++));n=s<<2|o>>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=Base64._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");var t="";for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones]
@=""
"SecuritySafe"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0]
"2004"=dword:00000003
"2001"=dword:00000003
@=""