This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'https://www.howtogeek.com/660517/how-to-find-your-windows-10-product-key-using-the-command-prompt/ | |
Set WshShell = CreateObject("WScript.Shell") | |
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId")) | |
Function ConvertToKey(Key) | |
Const KeyOffset = 52 | |
i = 28 | |
Chars = "BCDFGHJKMPQRTVWXY2346789" | |
Do | |
Cur = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
// At time of writing, for use with Visual Studio Code Version 1.29.1 and above | |
// | |
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and | |
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope | |
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is | |
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. | |
// Placeholders with the same ids are connected. | |
// Example: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
try | |
{ | |
$pdo = new PDO('mysql:host=localhost;dbname=company', 'cfn', 'naiman'); | |
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | |
$pdo->exec('SET NAMES "utf8"'); | |
} | |
catch (PDOException $e) | |
{ | |
$error = 'Unable to connect to the database server.'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
set -o allexport | |
source .env | |
set +o allexport |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This Source Code Form is subject to the terms of the Mozilla Public | |
* License, v. 2.0. If a copy of the MPL was not distributed with this | |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
#include "io.h" | |
#include <iostream> | |
// GET INPUTS from STDIN | |
std::vector<std::string> Get_STDIN_Strings(void) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This Source Code Form is subject to the terms of the Mozilla Public | |
* License, v. 2.0. If a copy of the MPL was not distributed with this | |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
#include <iostream> | |
int main() { | |
std::cout << "Hello World!" << std::endl; | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# update_repos - A simple script to update git repos within a directory | |
# Location where this script is stored in the filesystem | |
# STARTDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | |
# Location of the working directory of the calling shell | |
PARENTDIR=$PWD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# All in one script to setup vim extensions and setup bash(kinda) | |
# | |
# By Robert David Hernandez | |
# http://www.github.com/rhernandez513 | |
# | |
apt install exuberant-ctags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Directory navigation aliases | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias ....='cd ../../..' | |
alias .....='cd ../../../..' | |
alias back='cd $OLDPWD' | |
#misc aliases | |
alias open='gnome-open' | |
alias grep='grep -n' |
NewerOlder