Skip to content

Instantly share code, notes, and snippets.

View s10wen's full-sized avatar
💭
🦄

Simon Owen s10wen

💭
🦄
View GitHub Profile
@s10wen
s10wen / gist:7317734
Created November 5, 2013 11:29
24pullrequests errors
~/github/24pullrequests on master
$ bundle exec rake db:create:all
could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (fe80::1) and accepting
@s10wen
s10wen / gist:8530885
Last active October 15, 2018 10:14
Sublime Text - Key Bindings
Moved to:
https://github.com/s10wen/dotfiles/blob/master/init/Default%20(OSX).sublime-keymap
@s10wen
s10wen / gist:8578389
Created January 23, 2014 13:26
git stash discussion

I'm working on a project that involves theming:

https://github.com/mauricecruz/zero-base-themes/

The main repo has a file that's pointing to 'main-theme'.

I'm working locally on 'my-new-theme'.

In the main repo the file that includes the path to 'main-theme', locally I need to have as 'my-new-theme'.

@s10wen
s10wen / gist:8805508
Last active August 29, 2015 13:56
Potential Devices

Re: https://twitter.com/s10wen/status/430702763719536641

https://twitter.com/s10wen/status/431714041577635840

<iframe class="vine-embed" src="https://vine.co/v/MB6z1h0vqBa/embed/simple" width="600" height="600" frameborder="0"></iframe><script async src="//platform.vine.co/static/scripts/embed.js" charset="utf-8"></script> <iframe class="vine-embed" src="https://vine.co/v/MB6uw5YZjvg/embed/simple" width="600" height="600" frameborder="0"></iframe><script async src="//platform.vine.co/static/scripts/embed.js" charset="utf-8"></script>
@s10wen
s10wen / gist:c555e0c1e3815ebcff15
Created May 22, 2014 13:55
.bash_prompt config
PS1="\[\e]2;$PWD\[\a\]\[\e]1;\]$(basename "$(dirname "$PWD")")/\W\[\a\]${BOLD}\$(usernamehost)\[$GREEN\]\w\$(git_info)\[$WHITE\]\n\n༼ つ ◕_◕ ༽つ⚡ \[$RESET\]"
Gives you:
https://www.flickr.com/photos/simonowendesign/14244272004/
@s10wen
s10wen / gist:823e76d80322b0f28740
Created May 23, 2014 12:55
Bash script to watch for DNS changes
#!/bin/bash
while :;
do
echo "$(date)"
dig sitename.com;
sleep 600;
done
@s10wen
s10wen / gist:b3cb5eac430b7b5cc86d
Created June 10, 2014 09:03
websocket express.io
# client.html
```html
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="/socket.io/socket.io.js"></script>
<script>
io = io.connect()
room = prompt('type a room name')
// Emit ready event with room name.
#!/bin/bash
# Adds WordPress zipped up:
wget http://wordpress.org/latest.tar.gz
# Unzip WordPress:
tar xfz latest.tar.gz
# Move the contents of WordPress back a folder:
mv wordpress/* ./
@s10wen
s10wen / gist:6cf00ab86b96e5d1fa9c
Created July 22, 2014 12:12
copy `ls -al` from a server to local txt file
#!/bin/bash
# ssh into server
ssh [email protected]
# cd to path
cd /where/you/want/
# list everything in a vertical list
ls -al
#
# Prettified CSS from http://images.apple.com/v/home/bd/styles/home.built.css
# on 9th September 2014
#
/* ---- BUILT FILE. DO NOT MODIFY THIS DIRECTLY. ---- */
html {
font-size: 100%;
-ms-text-size-adjust: 100%;