Skip to content

Instantly share code, notes, and snippets.

View hc0503's full-sized avatar
🎯
Focusing

hc0503

🎯
Focusing
View GitHub Profile
$logpath = "c:\Servicing\weblog.txt"
$dtfmt = 'yyyy-mm-dd HH:mm:ss.ff'
$trigerTime = [System.DateTime]::UtcNow.tostring($dtfmt) # Could be $(Get-Date -AsUTC -Format $dtfmt ) in never versions of PS
function gather {
$adapters = Get-WmiObject -class win32_networkadapterconfiguration | where-object { $null -ne $_.DefaultIPGateway } | Select DNSDomain, IPAddress, MACAddress, Description, DefaultIPGateway
$result = New-Object -TypeName psobject -Property @{
user = $env:username
triggeredat = $trigerTime
adapters = $adapters
@howar31
howar31 / simple_scrollbar_hover_effect.css
Last active October 9, 2023 20:18
Neat and clean scrollbar with hover transition effect CSS
// Scrollbar with Hover Transition Effect
.container::-webkit-scrollbar {
width: 14px;
}
.container::-webkit-scrollbar-thumb {
background-clip: content-box;
border: 4px solid transparent;
border-radius: 7px;
box-shadow: inset 0 0 0 10px;
}
@primaryobjects
primaryobjects / react-confirm.js
Created November 1, 2017 19:03
A simple example of a confirm alert dialog in ReactJs / React.
<div className='delete-button' onClick={() => { if (window.confirm('Are you sure you wish to delete this item?')) this.onCancel(item) } } />
@maynagashev
maynagashev / .env
Last active January 7, 2021 08:37
Socialite providers .ENV boilerplate records forked from https://github.com/jeremykenedy/laravel-auth
# https://www.google.com/recaptcha/admin#list
RE_CAP_SITE=YOURGOOGLECAPTCHAsitekeyHERE
RE_CAP_SECRET=YOURGOOGLECAPTCHAsecretHERE
# https://vk.com/apps?act=manage
VKONTAKTE_KEY=your_vk_app_id
VKONTAKTE_SECRET=your_vk_app_secret
VKONTAKTE_REDIRECT_URI=http://yourwebsiteURLhere.com/social/handle/vkontakte
# https://developers.facebook.com/
@adrianhall
adrianhall / .eslintrc.js
Last active April 29, 2024 15:01
A sample .eslintrc file
var OFF = 0, WARN = 1, ERROR = 2;
module.exports = exports = {
"env": {
"es6": true
},
"ecmaFeatures": {
// env=es6 doesn't include modules, which we are using
"modules": true
@ryansechrest
ryansechrest / php-style-guide.md
Last active May 5, 2024 18:00
PHP style guide with coding standards and best practices.

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
@whitingx
whitingx / meta-tags.md
Created October 5, 2012 16:41 — forked from kevinSuttle/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@paulmillr
paulmillr / active.md
Last active April 23, 2024 17:32
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user =&gt; user.followers &gt; 1000)