Skip to content

Instantly share code, notes, and snippets.

View dvillega's full-sized avatar

Devin Villegas dvillega

  • LA
View GitHub Profile
@raws
raws / 01-install.txt
Created November 23, 2012 03:34
Install Ruby 1.9.3-p327 on a Synology DS1511+ with DSM 4.1
#########################################
### Install wget-ssl over ipkg's wget ###
#########################################
$ ipkg install -verbose_wget libidn # To get ipk URL
$ ipkg install -verbose_wget wget-ssl # To get ipk URL
$ /usr/syno/bin/wget http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/libidn_1.25-1_i686.ipk
$ /usr/syno/bin/wget http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/wget-ssl_1.12-2_i686.ipk
$ ipkg install libidn_1.25-1_i686.ipk
$ ipkg install wget-ssl_1.12-2_i686.ipk
@sowenjub
sowenjub / import_notes_app_to_evernote.applescript
Last active August 26, 2021 03:39 — forked from pdxmph/import_notes_app_to_evernote.applescript
Updated to import the modification date as well since that's how notes are sorted in Note.app
tell application "Notes"
set theNotes to every note of the folder "Notes"
repeat with thisNote in theNotes
set myTitle to the name of thisNote
set myText to the body of thisNote
set myCreateDate to the creation date of thisNote
set myUpdateDate to the modification date of thisNote
tell application "Evernote"
set theTransferredNote to create note with html myText ¬
title myTitle ¬
@tschieggm
tschieggm / flask_server.py
Created November 22, 2013 18:51
Stackdriver webhook server example
import string
import sys
import logging
import json
from flask import Flask
from flask import Response, request
logger = logging.getLogger(__name__)
logger.info("Stackdriver webhook-sample starting up on %s" % (string.replace(sys.version, '\n', ' ')))
Funny Tech Tweets
=================
### Corny ###
I know a programming joke about 10,000 mutexes, but it's a bit contentious.
--@secboffin
I also have a UDP joke. But you might not get it.
--@jonathanstray
@ralphschindler
ralphschindler / README.md
Last active May 1, 2024 19:14
Docker For Mac Host Address Alias To Enable PHP XDebug (10.254.254.254 Trick)

Docker (Mac) De-facto Standard Host Address Alias

This launchd script will ensure that your Docker environment on your Mac will have 10.254.254.254 as an alias on your loopback device (127.0.0.1). The command being run is ifconfig lo0 alias 10.254.254.254.

Once your machine has a well known IP address, your PHP container will then be able to connect to it, specifically XDebug can connect to it at the configured xdebug.remote_host.

Installation Of IP Alias (This survives reboot)

Copy/Paste the following in terminal with sudo (must be root as the target directory is owned by root)...

* what it's like to not be technical in the industry
* what you do in tech that people forget is needed
* the most interesting thing you've worked on recently
* what your day-to-day is like
* must-have gifs for every techie
* horrible code from the past that shows I'm much better now
* the best music for hacking
* mistakes you've made that make you groan
* how you've made it at well-known companies
* self-care in the tech bubble
# Helper class for statistics
# see: http://www.johndcook.com/blog/standard_deviation/
class Stats:
""" Uses Welford's method to calculate stats.
Assumes positive values.
It's not thread safe
stats = Stats("ConnectionTimeStats")
stats.add(0.223)
stats.add(1.343)
@lucindo
lucindo / Timer.py
Last active August 25, 2017 16:48
import time
# Simple Timer
class Timer:
def __init__(self):
self.reset()
def reset(self):
self._start = time.time()
def elapsed(self): # elapsed time in seconds (float)
@leastprivilege
leastprivilege / Whisk(e)y pre-release versioning scheme
Last active April 5, 2019 10:46
alphas, betas and RCs are boring - that's what I gonna use in the future for pre-release builds
I am fed up with alphas, betas and release candidates - especially since they don't mean anything anymore.
Here's my naming scheme for pre-releases. Slàinte!
aberfeldy
aberlour
ardbeg
ardmore
arran
aultmore