Skip to content

Instantly share code, notes, and snippets.

View hacksalot's full-sized avatar

hacksalot hacksalot

  • United States
View GitHub Profile
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 7, 2024 15:39
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@bellbind
bellbind / app.html
Created May 20, 2015 07:23
[electron]Use electron as a Web Server
<!doctype html>
<html><head><script src="app.js"></script></head><body></body></html>
@davidrapin
davidrapin / jsonError.js
Last active April 18, 2024 19:16
Extract a detailed JSON parse error (with line and column) in nodejs
'use strict';
var clarinet = require('clarinet');
/**
* Extract a detailed JSON parse error
* using https://github.com/dscape/clarinet
*
* @param {string} json
* @returns {{snippet:string, message:string, line:number, column:number, position:number}} or undefined if no error
*/
@hacksalot
hacksalot / gist:746c3290a7c2e077ed91
Last active February 25, 2019 15:39
Install Ruby/DevKit + Jekyll on Windows

Install Ruby 2.1.5

  1. Install [Ruby 2.1.5 for Windows (x64)][1] from [RubyInstaller.org][2].

    • Set Install Tcl/Tk support.
    • Set Add Ruby executables to your path
    • Set Associate .rb and .rbw files with this Ruby installation.
    • Do NOT include whitespaces in the destination folder.
  2. Run ruby -v to verify command line access and version.

@dubik
dubik / BBox.cpp
Last active April 8, 2023 18:04
// Vectormath https://github.com/erwincoumans/sce_vectormath
class Ray
{
public:
Ray();
public:
Vectormath::Aos::Vector3 m_pos;
Vectormath::Aos::Vector3 m_dir;
Vectormath::Aos::Vector3 m_invDir; // 1.0f / m_dir per elem
float m_min;
@audioplastic
audioplastic / nicks_observer.cpp
Created November 29, 2012 23:56
Super simple single threaded observer pattern for C++11
// C++11 style observer pattern implementation using lambda for scoped
// connection management.
//
// Copyright (c) 2012 Nick C.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
@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)
@mbostock
mbostock / .block
Last active April 8, 2024 13:46
Hello, D3!
license: gpl-3.0
@jrburke
jrburke / gist:1262861
Created October 4, 2011 21:26
Universal (AMD/Node/plain browser) module
/**
* First, better, "set exports/return" option
*/
(function (define) {
//The 'id' is optional, but recommended if this is
//a popular web library that is used mostly in
//non-AMD/Node environments. However, if want
//to make an anonymous module, remove the 'id'
//below, and remove the id use in the define shim.
define('id', function (require) {
@mattd
mattd / gist:1006398
Created June 3, 2011 14:12
nginx try_files with a proxy_pass
server {
root /var/www/example.com/static;
server_name example.com;
access_log /var/log/nginx/example.com.access.log;
error_log /var/log/nginx/example.com.error.log;
try_files /maintenance.html @proxy;
location @proxy {
proxy_pass http://127.0.0.1:10001;