Skip to content

Instantly share code, notes, and snippets.

View terremoth's full-sized avatar
🌄
Open to work. #HireMe

Lucas M. Dutra terremoth

🌄
Open to work. #HireMe
View GitHub Profile
@claudiosanches
claudiosanches / test.php
Last active February 22, 2024 19:39
Regex for test credit card brand
<?php
// Test cards
$cards = array(
'378282246310005', // American Express
'371449635398431', // American Express
'5078601870000127985', // Aura
'5078601800003247449', // Aura
'30569309025904', // Diners Club
'38520000023237', // Diners Club
@tbrianjones
tbrianjones / Inflect.php
Last active February 21, 2024 21:28
A PHP Class for converting English words between Singular and Plural.
<?php
// original source: http://kuwamoto.org/2007/12/17/improved-pluralizing-in-php-actionscript-and-ror/
/*
The MIT License (MIT)
Copyright (c) 2015
Permission is hereby granted, free of charge, to any person obtaining a copy
@kphillisjr
kphillisjr / QueryDotnet.js
Created August 22, 2018 23:47
JSCript.NET Working Examples
/*
To Compile:
PATH\\TO\\jsc.exe QueryDotnet.js
This example is based on:
https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed
*/
import System;
import Microsoft.Win32;
@VictorTaelin
VictorTaelin / icc.hvml
Last active February 6, 2024 13:45
Interaction Calculus of Constructions
// Interaction Calculus of Constructions
// =====================================
// Type
// ----
data Term
= (Lam bod)
| (App fun arg)
| (Val bod)
@logrusorgru
logrusorgru / mysql.sql
Last active January 16, 2024 07:01
SQL: uniqueness, automatic created_at, updated_at refresh + soft delete. SQLite, PostgreSQL, MySQL
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
-- mysql --
-- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--
-- mysql <http://sqlfiddle.com/#!9/91afb5/2>
-- note: sqlfiddle is very stupid
@MotionDesignStudio
MotionDesignStudio / ascii_movie_image_ver_1.py
Last active January 3, 2024 03:26
Python ASCII Video And ASCII Image Creator
#!/usr/bin/env python
import sys
import cv2
import subprocess
from subprocess import call
import aalib
import Image
@goregrish
goregrish / secure_link.md
Last active December 25, 2023 16:11
Nginx ngx_http_secure_link_module and PHP
@phoenixg
phoenixg / header_http_status_codes.php
Created April 6, 2013 14:02
PHP header() for sending HTTP status codes
<?php
/*
参考自:
http://darklaunch.com/2010/09/01/http-status-codes-in-php-http-header-response-code-function
http://snipplr.com/view/68099/
*/
function HTTPStatus($num) {
$http = array(
@MotionDesignStudio
MotionDesignStudio / google_voice_sms.py
Last active August 30, 2023 09:50
Mass Texting (SMS) Messaging Via Google Voice And Python
#!/usr/bin/env python
import sys
from googlevoice import Voice
from googlevoice.util import input
sys.dont_write_bytecode = True
username=str(sys.argv[1]).strip()
password=str(sys.argv[2]).strip()
@mlhaufe
mlhaufe / ShellBrowse.vbs
Last active August 19, 2023 19:28
VBScript File Browser
Option Explicit
' Flags for the options parameter
Const BIF_returnonlyfsdirs = &H0001
Const BIF_dontgobelowdomain = &H0002
Const BIF_statustext = &H0004
Const BIF_returnfsancestors = &H0008
Const BIF_editbox = &H0010
Const BIF_validate = &H0020
Const BIF_browseforcomputer = &H1000