Skip to content

Instantly share code, notes, and snippets.

View noize-e's full-sized avatar

noiz-e noize-e

View GitHub Profile
@omarish
omarish / node.py
Created March 26, 2011 20:33
Simple JSON-Friendly Python Tree
We couldn’t find that file to show.
@FGRibreau
FGRibreau / .gitignore
Created July 18, 2012 12:29
Find if a NodeJS module is available to require or not
node_modules
@ogrrd
ogrrd / dnsmasq OS X.md
Last active July 22, 2024 08:36
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

@Integralist
Integralist / 1. WindowMock.js
Last active November 9, 2020 20:51
Mocking the `window` object in JavaScript unit tests
define([
'module/bootstrap', // this is jQuery and PubSub libs
], function (lib) {
var windowMock = {
resizeSet: false, // set within the fake `lib` object below
createFakeWindow: function(width, height) {
return {
document: {
documentElement: {
@bzerangue
bzerangue / _verify-repair-permissions-disk.md
Last active July 19, 2024 07:35
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /

@pirj
pirj / ruby-block-sugar.asciidoc
Last active July 29, 2022 14:19
Ruby block sugar

You won’t find rants on how functional programming improves you, your sanity and your life overall here. There are some examples in the very beginning to save you some time on reading the whole post, just come along if you don’t like how they look like.

By the way, this is not even a blog, so formally this is not even a blog post. This is not a library or a new paradigm. It’s just a few pieces of code that might come handy for your daily job.

Example:

[1, 3.14, -4].map &_.safe{ magnitude odd? } # => [true, nil, false]
@mdang
mdang / RAILS_CHEATSHEET.md
Last active July 23, 2024 12:01
Ruby on Rails Cheatsheet

Ruby on Rails Cheatsheet

Architecture

Create a new application

Install the Rails gem if you haven't done so before

@Uchean
Uchean / README.md
Created January 31, 2016 14:04 — forked from ahmozkya/README.md
Homebrew with DNSMasq + DNSCrypt-proxy (OpenDNS)

Install & Configure

  1. Install DNSMasq
$ brew install dnsmasq
  1. Install DNSCrypt-proxy
$ brew install dnscrypt-proxy
@ikarius6
ikarius6 / entuhogar.dev.conf
Created February 12, 2016 19:35
Vhost example Nginx, CI on subfolder and pretty URLs
################################################################################
####################
### Virtual Host for entuhogar.dev subdomain
################################################################################
####################
server {
listen *:80;
server_name entuhogar.dev
### Front public folder
@zhiguangwang
zhiguangwang / README.md
Last active June 8, 2024 00:55
Disable and Enable kdc on Mac OS X

If you don't like or need the kdc process on Mac OS X, which opens TCP port 88 to the world, you can disable it with launchctl.

Disable:

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.Kerberos.kdc.plist

Enable:

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.Kerberos.kdc.plist