-
Create a file to store our credentials:
sudo vim /etc/postfix/sasl_passwd
-
Add something like this:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'objspace' | |
def self.show_allocations(&block) | |
_ = ObjectSpace.trace_object_allocations &block | |
ObjectSpace | |
.each_object | |
.to_a | |
.filter_map do |obj| | |
file = ObjectSpace.allocation_sourcefile obj | |
line = ObjectSpace.allocation_sourceline obj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys,os | |
import curses | |
def draw_menu(stdscr): | |
k = 0 | |
cursor_x = 0 | |
cursor_y = 0 | |
# Clear and refresh the screen for a blank canvas | |
stdscr.clear() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Author: Stefan Buck | |
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447 | |
# | |
# | |
# This script accepts the following parameters: | |
# | |
# * owner | |
# * repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Download Elementary OS from here: | |
#http://sourceforge.net/projects/elementaryos/files/stable/ | |
#First you update your system | |
sudo apt-get update && sudo apt-get dist-upgrade | |
#Install Google Chrome | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XCPlayground | |
import Foundation | |
import UIKit | |
class Channel<T> | |
{ | |
var stream: Array<T> | |
let queue: dispatch_queue_t | |
let semaphore: dispatch_semaphore_t | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** The returned generator will enumerate each value of the provided tuple. */ | |
func generatorForTuple(tuple: Any) -> AnyGenerator<Any> { | |
return anyGenerator(Mirror(reflecting: tuple).children.lazy.map { $0.value }.generate()) | |
} | |
// Blogged at http://design.featherless.software/enumerating-tuple-values-swift/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y upgrade | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev libffi-dev libjemalloc-dev | |
apt-get -y install autoconf curl bzip2 | |
apt-get -y autoremove | |
apt-get -y clean | |
cd /usr/local/src | |
curl http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
2013-09-29 21:23:26.468 perf[3911:60b] Sep 26, 2013, 8:47 AM confidence high type walking steps 16 | |
2013-09-29 21:23:26.474 perf[3911:60b] Sep 26, 2013, 8:56 AM confidence medium type walking steps 0 | |
2013-09-29 21:23:26.492 perf[3911:60b] Sep 26, 2013, 9:08 AM confidence high type stationary steps 25 | |
... | |
*/ | |
if([CMMotionActivityManager isActivityAvailable]) { | |
CMMotionActivityManager *cm = [[CMMotionActivityManager alloc] init]; | |
CMStepCounter *sc = [[CMStepCounter alloc] init]; |
NewerOlder