Skip to content

Instantly share code, notes, and snippets.

View moughamir's full-sized avatar
:shipit:
Inspecting elements

Mohamed Moughamir moughamir

:shipit:
Inspecting elements
View GitHub Profile
@chlserver
chlserver / gist:16fe67a9978250e57c6de063fb758b7b
Created February 14, 2020 21:56
Copy Folder and SubFolder Files With Certain File Extension From More Than One Location to %AppData% Variable Path.
Using Vbscript, I am trying to copy files with certain file extensions such as [.tmp, .dat, .txt] from folder and subfolder in more than one location to %AppData% destination user an elevated privillege. Below is the sample of my code that prompts Permission Denined
' Require variables to be defined
Option Explicit
' Global variables
Dim strBaseFolder
Dim strDestFolder
Dim objFSO
Dim objFolder
@akella
akella / setup.md
Last active November 8, 2024 12:49
My Setup
@comficker
comficker / HEX2RGB.js
Created June 6, 2018 01:16
Bellow are javascript code can convert hex to rgb color. Demo: http://aiconverter.com/color/hex-to-rgb
function HEX2RGB (hex) {
"use strict";
if (hex.charAt(0) === '#') {
hex = hex.substr(1);
}
if ((hex.length < 2) || (hex.length > 6)) {
return false;
}
var values = hex.split(''),
r,
using UnityEngine;
using UnityEngine.EventSystems;
public class FixedButton : MonoBehaviour, IPointerUpHandler, IPointerDownHandler
{
[HideInInspector]
public bool Pressed;
// Use this for initialization
void Start()
@jsphdnl
jsphdnl / BlockChain1.js
Created January 9, 2018 13:32
BlockChain from Scratch Part 01 - javascript
var crypto = require('crypto')
, shasum = crypto.createHash('sha1');
/*
* Install "cyrpto" lib dependeny to compute the hash
* `npm install crypto`
*/
class TRBlock {
/**
* constructor for creating a block
@jsphdnl
jsphdnl / blockchain_1.py
Created January 9, 2018 12:40
BlockChain from Scratch Part 01 - python
import hashlib
import json
class TRBlock(object) :
def __init__(self, index, timestamp, data, prevHash, nonce, target):
'''
Default constructor for creating a block.
Parameters
@heygrady
heygrady / mapDispatchToProps.md
Last active September 16, 2023 19:19
Redux containers: mapDispatchToProps

Redux containers: mapDispatchToProps

This document details some tips and tricks for creating redux containers. Specifically, this document is looking at the mapDispatchToProps argument of the connect function from [react-redux][react-redux]. There are many ways to write the same thing in redux. This gist covers the various forms that mapDispatchToProps can take.

@umidjons
umidjons / youtube-dl-download-audio-only-on-best-quality.md
Last active November 14, 2024 21:20
Download Audio from YouTube with youtube-dl

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@halkyon
halkyon / cleanup-win10.ps1
Last active November 2, 2024 19:51
Cleanup Windows 10 Powershell script
##
## Windows 10 cleanup script.
## Remove dodgy tracking settings, unneeded services, all apps, and optional features that come with Windows 10. Make it more like Windows 7.
## NOTE: this was tested on Creators Update (1703) and Fall Creators Update (1709). Some of this may not work as expected on newer versions.
##
## Instructions
## 1. Run this script (under Powershell as Administrator):
## powershell -ExectionPolicy Bypass .\cleanup-win10.ps1
## 2. Let it run through, you may see a few errors, this is normal
## 3. Reboot
@prkstaff
prkstaff / init.vim
Last active September 13, 2023 20:27
My NeoVim config + Dracula theme + NerdTree
"*****************************************************************************
"" Vim-PLug core
"*****************************************************************************
if has('vim_starting')
set nocompatible " Be iMproved
endif
let vimplug_exists=expand('~/.config/nvim/autoload/plug.vim')
let g:vim_bootstrap_langs = "javascript,php,python,ruby"