Skip to content

Instantly share code, notes, and snippets.

View elephantatech's full-sized avatar

Elephantatech elephantatech

View GitHub Profile
@elephantatech
elephantatech / template.py
Last active September 30, 2023 01:53
python basic script template to run with python3
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
def main():
"""main function"""
env_vars = os.environ
for var, value in env_vars.items():
print(f"{var}: {value}")
@elephantatech
elephantatech / wordgen.html
Created September 28, 2023 12:26
word generator with scoring is the it is read correctly
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Word Generator</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
@elephantatech
elephantatech / Microsoft.PowerShell_profile.ps1
Last active August 19, 2020 22:24
my powershell prompt
# edit the $PROFILE using command with vscode on windows
# #> code $PROFILE
# first time you edit it will save on C:\Users\[your username]\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
# you can also create it manually as well.
# following will create prompt with the following style
# [2020-08-19 18:20:56] ~>
# #>
#
# $ before > means you are on session with admin rights
# [2020-08-19 18:24:05] ~\Documents\GitHub>
@elephantatech
elephantatech / importjsontoexcel.md
Last active August 12, 2019 16:48
Import Json file into Excel table

Import JSON to Excel

assets

Example json file with a list of items - productlist.json

Steps

  1. Open New workbook in Excel 2016
  2. Go to Data tab
@elephantatech
elephantatech / hyper-v_ubuntu_resolution.txt
Last active September 8, 2016 23:39
how to change resolution on Ubuntu v14+ Guest in Hyper-v
Open Terminal
Type: sudo vi /etc/default/grub
Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT, and add video=hyperv_fb:[the resolution you want].
The resolution I want is 1280x720. So my line ends up looking like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1280x720"
Write the changes and quit vi.
Run: sudo update-grub
Reboot the virtual machine
@elephantatech
elephantatech / vmware_mount_dir.sh
Last active September 8, 2016 17:10
This is a script to create to automate the mounting of the vmware workstation share drive
#!/bin/bash
# @Author: Elephantatech
# @github: https://github.com/elephantatech
# @Createddate: September 8th 2016
# @Disclaimer: This is not my solution I found it online at http://askubuntu.com/a/781314.
#
# May way of solving this issue is to resort to vmhgfs-fuse installed with open-vm-tools.
# Either mount locally using vmhgfs-fuse .host:/$(vmware-hgfsclient) ~/some_mountpoint or globally using
# sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other.
#
@elephantatech
elephantatech / HTML5 boostrap button example
Created March 23, 2016 16:48
HTML5 bootstrap button example that allows to update text within a tag with an id
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</head>
<body>
@elephantatech
elephantatech / Keyboardshortcuts
Created June 16, 2015 18:41
windows Keyboad short cuts
100+ Keyboard Shortcuts
Keyboard Shorcuts (Microsoft Windows)
1. CTRL+C (Copy)
2. CTRL+X (Cut)
3. CTRL+V (Paste)
4. CTRL+Z (Undo)
5. DELETE (Delete)
6. SHIFT+DELETE (Delete the selected item permanently without placing the item in the Recycle Bin)
7. CTRL while dragging an item (Copy the selected item)
@elephantatech
elephantatech / threejsCubeSample.html
Created July 12, 2013 19:32
simple three.js sample with cube mesh
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
body {
background-color: #ffffff;
margin: 0;
overflow: hidden;
}