Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Lo Nigro Daniel15

View GitHub Profile
View gist:d12f9170db16f36183127657c16d61fd
# Handle requests for files that could be screenshots.
# Try ss.dan.cx files before passing to ASP.NET
location ~ "^/\d{4}/\d{2}/.+\.(png|jpg|jpeg|gif|mp4)$" {
alias /var/www/;
try_files dan.cx/public/$uri ss.dan.cx/$uri @aspnet;
}
View gist:d84b39e8a260ee2a7d627751d015181b
# Without Language
/ /en/ 302 Language=en
/ /en/ 302 Language=en-us
/ /en/ 302 Language=en-au
/ /en/ 302 Language=en-nz
/ /en/ 302 Language=en-za
/ /en/ 302 Language=en-bz
/ /en/ 302 Language=en-tt
/ /fr/ 302 Language=fr
/ /fr/ 302 Language=fr-be
View gist:a4efd1d55ef37239e0fde397b62153bf
javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class org.jfree.chart.JFreeChart
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.MetaClass$3.doDispatch(MetaClass.java:196)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
View gist:a47a1ca02e708fb016ecaaade982a3ba
Geekbench 4.0.1 Tryout : http://www.geekbench.com/
Geekbench 4 is in tryout mode.
Geekbench 4 requires an active Internet connection when in tryout mode, and
automatically uploads test results to the Geekbench Browser. Other features
are unavailable in tryout mode.
Buy a Geekbench 4 license to enable offline use and remove the limitations of
tryout mode.
@Daniel15
Daniel15 / blah.js
Created Nov 30, 2015
Modify source map to move everything down by five lines
View blah.js
var DOCBLOCK_LINES = 5;
var first = new sourceMap.SourceMapConsumer(input);
var generator = new sourceMap.SourceMapGenerator({
file: first.file,
});
first.eachMapping(function(mapping) {
generator.addMapping({
generated: {
column: mapping.generatedColumn,
View gist:d2fdd07df075f5e5353b
node_modules/gulp-babel/node_modules/babel-core/lib/api/browser.js:40
40: if (!hold) run(param);
^^^^^^^^^^ function call
40: if (!hold) run(param);
^^^^^ array literal. This type is incompatible with
19: function run(code /*: string*/) /*: any*/ {
^^^^^^ string
node_modules/gulp-babel/node_modules/babel-core/lib/api/browser.js:62
62: run(param, index);
View gist:bdcfd57b9915bade7d2a
Process: Atom [19842]
Path: /Applications/Atom.app/Contents/MacOS/Atom
Identifier: com.github.atom
Version: 1.1.0 (1.1.0)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Atom [19842]
User ID: 215897963
Date/Time: 2015-11-02 11:32:50.249 -0800
View gist:264b258428e797ec6f91
<?xml version="1.0" encoding="utf-16"?>
<?xml-stylesheet type="text/xsl" href="ActivityLog.xsl"?>
<activity>
<entry>
<record>1</record>
<time>2015/08/09 00:50:07.611</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Microsoft Visual Studio 2015 version: 14.0.23107.0</description>
</entry>
View BaseStore.js
import EventEmitter from 'events';
import Dispatcher from '../dispatcher';
const CHANGE_EVENT = 'change';
export default class BaseStore extends EventEmitter {
constructor() {
super();
this.dispatchToken = Dispatcher.register(this.handleDispatch.bind(this));
@Daniel15
Daniel15 / gist:7f767d0879685a98fc46
Created May 9, 2015
Mono FastCGI package issues
View gist:7f767d0879685a98fc46
22:25 daniel@dan /home/daniel
% sudo apt-get install mono-fastcgi-server mono-fastcgi-server4
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation: