Skip to content

Instantly share code, notes, and snippets.

@manuhabitela
manuhabitela / compile.js
Last active September 4, 2019 08:51
Checking environment in (node) Sass
#!/usr/bin/env node
var fs = require('fs');
var path = require('path');
var sass = require('node-sass');
var ENV = process.env.SASS_ENV || 'development';
var file = 'variables.scss';
//if in dev, directly pass file to sass
if (ENV === "development") {
@bzerangue
bzerangue / _verify-repair-permissions-disk.md
Last active March 25, 2024 22:48
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 /

@pvencill
pvencill / LDAPjs New User
Last active January 19, 2023 04:44
Creating a new user in LDAPjs; complete example.
var ldap = require('ldapjs');
var ssha = require('node-ssha256');
var BASE = 'ou=Users,dc=example,dc=org';
// default port for ldaps
var URL = 'ldaps://ldap.example.org/:636';
// user and pass are for existing user with rights to add a user
@Kartones
Kartones / postgres-cheatsheet.md
Last active April 19, 2024 13:15
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@PDegenPortnoy
PDegenPortnoy / csshX example
Created December 5, 2013 20:33
Use example of csshX to start multiple, simultaneous, interactive SSH sessions
pdp-mbp: ~ $ cat hostlist.txt
sfo-crawl-4
sfo-crawl-5
sfo-crawl-6
sfo-crawl-7
sfo-crawl-8
sfo-crawl-9
sfo-crawl-11
sfo-crawl-14
pdp-mbp: ~ $ csshX --host hostlist.txt
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt