Skip to content

Instantly share code, notes, and snippets.

View dmitryd's full-sized avatar

Dmitry Dulepov dmitryd

View GitHub Profile
@nelstrom
nelstrom / access-control-lists-on-osx.md
Last active December 9, 2023 23:29
Setting ACL on OS X

I have two user accounts set up on my mac. User drew I use for most things, but if I'm making a screencast I'll switch to the demo user. I know that the demo user has a clean desktop, and the font size is larger than usual in my terminal and text editors, making everything a bit more legible when capturing the screen. When I record a screencast as the demo user, I save the file to /Users/Shared/screencasts. As I understand it, the /Users/Shared directory is supposed to be accessible to all user accounts on the mac. If I created and saved a screenflow document as the demo user, I should be able to read and write that file when logged in as user drew.

That was the theory, but it didn't always work out that well in practice. I would occasionally find that a directory was only writable by one user or the other. Perhaps I'd open a screenflow document as user drew and attempt to export the video to the same directory, only to find that the directory was owned by demo, meaning that I couldn't cr

@2bard
2bard / translation_notes
Created December 18, 2012 16:29
Using Symfony translation component in Twig outside of Symfony2 framework.
Note: I've left some of the full package names in tact to show exactly where the class comes from.
#### Pull dependencies in using composer ####
//Example composer.json
{
"require": {
"symfony/config" : "2.1.0",
"symfony/yaml" : "2.1.0",
"twig/twig": "1.9.0",
@edwardgeorge
edwardgeorge / automasq.py
Created January 6, 2010 18:33
save dhcp provided dns servers to resolv.conf compatible file (OSX)
#!/usr/bin/env python
"""OSX-based script to watch for changes to network state and write out a
second resolv.conf file containing the DHCP provided nameservers, intended
for use with a local resolver such as dnsmasq. This is to workaround the
changes in Snow Leopard from Leopard with regards to DNS resolution.
ie: the inability to have both manually configured nameservers and
DHCP provided ones as well as the issues with split-DNS.
usage: python automasq.py /path/to/second/resolv.conf