Skip to content

Instantly share code, notes, and snippets.

View eonarheim's full-sized avatar
🕹️
Fixin' bugs

Erik Onarheim eonarheim

🕹️
Fixin' bugs
View GitHub Profile
@44213
44213 / VolumeDetect.md
Created September 18, 2021 08:43 — forked from xycui/VolumeDetect.md
Use ffmpeg to detect audio volume level. bat file included for easier interaction.

Detect the audio file volume with ffmpeg.

Require tools

  • ffmpeg: [Official site][1], [Download][2]

How to use

  1. Download ffmpeg from [link][2]
  2. Extract the ffmpeg.exe from zip package and copy to the directory contain the audio file
  3. Copy the volumeDetect.bat into the folder. (Just make sure the bat file and ffmpeg.exe are in the same directory)
  4. Doulbe click volumeDetect.bat and drag the file into the window.
  5. Press enter and get the result.
@easyveazie
easyveazie / Join Skype Meeting Command Line
Last active April 9, 2021 10:05
Join Skype Meeting Command Line
We have a "virtual room" at the office that we use to expand our office with our remote teammates.
It's essentially laptop hooked up to a fancy camera that hosts a Skype meeting.
In order to simulate a user logging into Skype and joining the meeting, we run a PowerShell script that opens the conference room,
and simulate CTRL + SHIFT + ENTER to join with video.
$x = New-Object -COM WScript.Shell
$x.Run('"C:\Program Files (x86)\Microsoft Office\root\Office16\lync.exe" conf:sip:https://join.mydomain.com/meet/myusername/Y5356B19')
sleep -seconds 10
$x.SendKeys("^(+~)")
@Volcanoscar
Volcanoscar / greyscale.frag
Created January 19, 2017 08:28 — forked from wiseoldduck/greyscale.frag
A simple glsl color -> greyscale shader, using luminosity method
// fragment shader
//
// RGBA color to RGBA greyscale
//
// smooth transition based on u_colorFactor: 0.0 = original, 1.0 = greyscale
//
// http://www.johndcook.com/blog/2009/08/24/algorithms-convert-color-grayscale/
// "The luminosity method is a more sophisticated version of the average method.
// It also averages the values, but it forms a weighted average to account for human perception.
// We’re more sensitive to green than other colors, so green is weighted most heavily. The formula
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@Flafla2
Flafla2 / Perlin_Tiled.cs
Last active February 19, 2024 16:29
A slightly modified implementation of Ken Perlin's improved noise that allows for tiling the noise arbitrarily.
public class Perlin {
public int repeat;
public Perlin(int repeat = -1) {
this.repeat = repeat;
}
public double OctavePerlin(double x, double y, double z, int octaves, double persistence) {
double total = 0;
@LeaVerou
LeaVerou / RAINBOWlog.js
Created March 12, 2014 23:30
AWESOMEify your console.log()ing! Because life is too short to be black & white!!!!!!1111one
(function(){
var log = console.log;
console.log = function(str) {
var css = 'background: linear-gradient(to right, red, yellow, lime, aqua, blue, fuchsia, red); color: white; font-weight: bold;';
var args = Array.prototype.slice.call(arguments);
args[0] = '%c' + args[0];
args.splice(1,0,css);
return log.apply(console, args);
}
@addyosmani
addyosmani / headless.md
Last active July 18, 2023 18:47
So, you want to run Chrome headless.

Update May 2017

Eric Bidelman has documented some of the common workflows possible with headless Chrome over in https://developers.google.com/web/updates/2017/04/headless-chrome.

Update

If you're looking at this in 2016 and beyond, I strongly recommend investigating real headless Chrome: https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md

Windows and Mac users might find using Justin Ribeiro's Docker setup useful here while full support for these platforms is being worked out.

@testcollab
testcollab / an_example_usage.rb
Created September 22, 2011 23:31
Editing a File via the GitHub API v3
require 'editor.rb'
ed = Editor.new('testcollab/rails-test')
if ed.update_file('README.txt', 'my message', 'my new content')
ed.set_author('Scott', 'schacon@gmail.com')
ed.update_file('README.2.txt', 'my message', 'my new content')
end