Skip to content

Instantly share code, notes, and snippets.

Noitidart Noitidart

Block or report user

Report or block Noitidart

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View nginx-fooapp.com
server {
listen 80;
server_name myapp.com;
location / {
# Pass off API and socket requests to the app server
proxy_pass http://127.0.0.1:9000;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
@nahanil
nahanil / layout.ejs
Last active Sep 8, 2019
Sails page title
View layout.ejs
<!DOCTYPE html>
<html lang="en">
<head>
<title><%= typeof data !== 'undefined' && data.title ? data.title + ' | ' : (typeof title == 'undefined' ? '' : title + " | " )%><%= sails.config.appName %> | Chinese - English Dictionary &amp; Mandarin Learning Resources</title>
...
@ssokolow
ssokolow / firefox_migration.rst
Last active Feb 25, 2019
Disaster Plans for Firefox XUL Sunset
View firefox_migration.rst

Disaster Plans for Firefox XUL Sunset

Public URL:Github Gist
Status: Incomplete
Last Updated:2018-08-23 04:10 EDT

Threat Summary

@brenopolanski
brenopolanski / npm-list-globally.md
Created Nov 1, 2016
Listing globally installed NPM packages and version
View npm-list-globally.md
npm list -g --depth=0
@Noitidart
Noitidart / bugzilla-search.md
Last active Oct 20, 2016
how to search on bugzilla
View bugzilla-search.md

Note: Bugzilla has a [somewhat esoteric][bugzilla-searchhelp] search syntax. To look for all open and closed WebExtension bugs that mentioned the history API, [try searching][bugzilla-searchhistory] for ALL Component:WebExtensions #history, which should turn up [Bug 1208334][]: "Implement history API for open extension API."

@tylerlong
tylerlong / AXWindow.swift
Last active Aug 13, 2019
Make window frontmost (BUT not floating. I don't know how to make windows floating)
View AXWindow.swift
import Cocoa
class AXWindow {
let app: AXUIElement
let window: AXUIElement
init(app: AXUIElement, window: AXUIElement) {
self.app = app
self.window = window
@carlin-q-scott
carlin-q-scott / keycodeCaptor.js
Last active Jun 28, 2016
Detect Media Key events on MacOSX
View keycodeCaptor.js
/*jshint moz: true, undef: true, unused: true */
/*global ctypes, require, console, exports */
let { Cu } = require('chrome');
let { setTimeout } = require('sdk/timers');
Cu.import('resource://gre/modules/ctypes.jsm');
var objc = ctypes.open(ctypes.libraryName('objc'));
var is64bit = ctypes.voidptr_t.size == 4 ? false : true;
@Happy-Ferret
Happy-Ferret / lib.hs
Last active Nov 8, 2016
Mixed assembly (C/Haskell)
View lib.hs
{-# LANGUAGE ForeignFunctionInterface #-}
module Test where
import Foreign.C.Types
hsfun :: CInt -> IO CInt
hsfun x = do
putStrLn "Hello from haskell"
return (42 * x)
hsfoo :: CInt -> IO CInt
@gaearon
gaearon / connect.js
Last active Nov 13, 2019
connect.js explained
View connect.js
// connect() is a function that injects Redux-related props into your component.
// You can inject data and callbacks that change that data by dispatching actions.
function connect(mapStateToProps, mapDispatchToProps) {
// It lets us inject component as the last step so people can use it as a decorator.
// Generally you don't need to worry about it.
return function (WrappedComponent) {
// It returns a component
return class extends React.Component {
render() {
return (
View HTML Printing API Proposal
/**
* @constructs Printer
*/
function Printer(){};
Printer.prototype = {};
/**
* Returns if printer is local or network
* @returns {boolean}
*/
Printer.prototype.isLocal = function(){return true;};
You can’t perform that action at this time.