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
fswatch -r . --exclude "/target/" -o | xargs -n1 -I{} cargo test |
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 ruby | |
require 'colorize' | |
require 'sequel' | |
DB = Sequel.connect "postgres:///ospd" | |
# Helper method | |
class String | |
def counts |
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
module Versioned | |
module V0 | |
def method_missing name | |
puts "#{name} not found".red | |
end | |
end | |
module V1 | |
def foo | |
puts "foo 1" |
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
class Related < Sequel::Model; end | |
class Parent < Sequel::Model | |
plugin( | |
:class_table_inheritance, | |
key: :type, | |
table_map: { | |
:Child => :children | |
} | |
) |
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
const reactComponent = React.createClass({ | |
mixins: [], | |
propTypes: {}, | |
// Initial defaults | |
//getDefaultProps: function(){}, | |
//getInitialState: function(){}, | |
// Property change lifecycle |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Test Page</title> | |
</head> | |
<style> | |
HTML, BODY, MAIN { | |
width: 100%; | |
height: 100%; |
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
#!/bin/bash | |
echo 'alias ll="ls -l"' >> /etc/profile | |
echo 'alias morningbrew="brew update && brew upgrade --all && brew cleanup && brew prune && gem update"' >> /etc/profile |
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
#!/bin/bash | |
processors=$(cat /proc/cpuinfo | awk '/^processor/{print $3}' | wc -l) | |
# Usage information | |
if [ $# -ne 2 ] | |
then | |
echo "Usage: $0 <source_file> <dbname>" | |
echo | |
echo "This script will restore the requested database from the given source file." |
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
#!/bin/bash | |
# This file is being maintained by Puppet. | |
# DO NOT EDIT | |
# Usage information | |
if [ $# -ne 2 ] | |
then | |
echo "Usage: $0 <original_name> <new_name>" | |
echo |
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
# Connect to Microsoft Online as admin | |
$cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "[email protected]",(Get-Content admin.pass | ConvertTo-SecureString) | |
Connect-MsolService -Credential $cred | |
# Connect to Office365 as admin | |
$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $cred -Authentication Basic -AllowRedirection | |
Set-ExecutionPolicy unrestricted | |
Import-PSSession $session |
NewerOlder