Skip to content

Instantly share code, notes, and snippets.

View chaojian-zhang's full-sized avatar
🏯
When I am doing programming: I want to be God.

Charles Zhang chaojian-zhang

🏯
When I am doing programming: I want to be God.
View GitHub Profile
@Kakusakov
Kakusakov / Perlin.cs
Last active October 15, 2023 07:52 — forked from Flafla2/Perlin.cs
Improved Perlin Noise Implementation in C#
// Clone of https://gist.github.com/Flafla2/1a0b9ebef678bbce3215 with more dimensions and seed generation.
public class PerlinGen
{
private readonly int[] p; // Randomly shuffled array of values from 0 to 255.
// Values are repeated twice to get performance boost
// from avoiding the use of modulo operator.
public PerlinGen(int seed)
{
@imgerson
imgerson / index.html
Created December 22, 2018 22:07
Interactive video with HTML5 and JavaScript
<!DOCTYPE html>
<html>
<head>
<title>Basic interactive video with HTML5 and vanilla JavaScript</title>
</head>
<body>
<!-- Read my blog post on interactive videos: https://mostlydevstuff.com/2018/basic-interactive-video-with-html5-and-javascript/ -->
<style>
@102
102 / gitcommitsbydate.sh
Last active July 11, 2023 00:22
get commits by author between two dates
# to get commit messages of user 'rgusev' betwen 2017-01-01 and 2017-31-12
# sh gitcommitsbydate.sh rgusev 2017-01-01 2017-31-12
git log --author=$1 --pretty=format:"%s" --no-merges --after="$2" --before="$3"
@craigtp
craigtp / GetWindowsProductKey.vbs
Created May 30, 2016 18:10
Retrieve Windows Product Key
Option Explicit
Dim objshell,path,DigitalID, Result
Set objshell = CreateObject("WScript.Shell")
'Set registry key path
Path = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\"
'Registry key value
DigitalID = objshell.RegRead(Path & "DigitalProductId")
Dim ProductName,ProductID,ProductKey,ProductData
'Get ProductName, ProductID, ProductKey
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 22, 2024 04:43
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@doches
doches / reference.lua
Created March 27, 2012 19:47
Lua Cheat Sheet
-- Lua Cheat Sheet for Programmers, by Al Sweigart http://coffeeghost.net
-- This cheat sheet is an executable Lua program.
--[[ This is
a multline comment]]
---[[ This is a neat trick. The first -- makes -[[ not a multiline comment.
print("This line executes.")
--]] The rest of this line is also a comment.
print("Here is a string" .. ' concatenated with ' .. 2 .. ' other strings.')
@MrChuffmanSnippets
MrChuffmanSnippets / index.html
Created March 15, 2012 10:05
HTML5: Blank Template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<link href="style.css" rel="stylesheet" />
</head>
<body>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>