Skip to content

Instantly share code, notes, and snippets.

@arturosalgado
arturosalgado / ftpsupload.ps1
Created September 15, 2020 10:08 — forked from pbrumblay/ftpsupload.ps1
Powershell FTPS Upload Example
param (
[string]$file = $(throw "-file is required"),
[string]$ftphostpath = $(throw "-ftphostpath is required"),
[string]$username = $(throw "-username is required"),
[string]$password = $(throw "-password is required")
)
$f = dir $file
$req = [System.Net.FtpWebRequest]::Create("ftp://$ftphostpath/" + $f.Name);
$req.Credentials = New-Object System.Net.NetworkCredential($username, $password);
ALTER TABLE students
ADD COLUMN
full_name varchar(250) GENERATED ALWAYS AS (second_last_name || ' ' || last_name || ' ' || name ) STORED
@arturosalgado
arturosalgado / font-awesome-v5.0.1.json
Created May 25, 2021 16:43
List of all free Font Awesome icons class names v5.0.1
{"name":"Font Awesome v5.0.1", "icons":[
"fab fa-500px",
"fab fa-accessible-icon",
"fab fa-accusoft",
"fas fa-address-book", "far fa-address-book",
"fas fa-address-card", "far fa-address-card",
"fas fa-adjust",
"fab fa-adn",
"fab fa-adversal",
"fab fa-affiliatetheme",
@arturosalgado
arturosalgado / recursive_copy_files.php
Created August 1, 2021 20:51 — forked from gserrano/recursive_copy_files.php
PHP Recursive copy files
/*
* This function copy $source directory and all files
* and sub directories to $destination folder
*/
function recursive_copy($src,$dst) {
$dir = opendir($src);
@mkdir($dst);
while(( $file = readdir($dir)) ) {
if (( $file != '.' ) && ( $file != '..' )) {
@arturosalgado
arturosalgado / scrap-web-dynamic-js-dom
Created September 12, 2021 13:59
Scrap the web, works on sites with javascript-created dom items. Ubuntu Linux version.
sudo pip3 install requests
>sudo: pip3: command not found
sudo apt install python3-pip
pip3 install requests-html.
>pyppeteer.errors.BrowserError: Browser closed unexpectedly:
php artisan make:migration add_liveintent_column --table=leads
@arturosalgado
arturosalgado / addDoubleBackSlash.dart
Last active September 11, 2024 22:52
backSalashMe
void main() {
String originalString = getString();
String doubledBackslashes = originalString.replaceAll('\\', '\\\\');
print(doubledBackslashes);
}
String getString() {
return r'''
{
"tblnm": "virusrmgt",