This file contains hidden or 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
@Override | |
public boolean onTouchEvent(MotionEvent event) | |
{ | |
switch(event.getAction()) | |
{ | |
case MotionEvent.ACTION_DOWN: | |
x1 = event.getX(); | |
y1 = event.getY(); | |
break; | |
This file contains hidden or 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
var styles = document.querySelectorAll('style'); | |
for(var i = 0; i < styles.length; i++) { | |
styles[i].remove(); | |
} | |
var linkedStyles = document.querySelectorAll('link[rel="stylesheet"]'); | |
for(var i = 0; i < linkedStyles.length; i++) { | |
linkedStyles[i].remove(); | |
} |
This file contains hidden or 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 { Component, Input } from '@angular/core'; | |
import { Router } from '@angular/router'; | |
import { AngularFire, FirebaseListObservable } from 'angularfire2'; | |
import { Observable } from 'rxjs'; | |
declare var firebase: any; | |
interface Image { | |
path: string; |
This file contains hidden or 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
{ | |
"word_separators": "./\\()\"':,.;<>~!@#%^&*|+=[]{}`~?" | |
} |
This file contains hidden or 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
FROM ruby:2.3.1 | |
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs | |
RUN apt-get install -y imagemagick | |
RUN mkdir /usr/local/rails-app | |
WORKDIR /usr/local/rails-app | |
ADD Gemfile Gemfile | |
ADD Gemfile.lock Gemfile.lock | |
RUN bundle install |
This file contains hidden or 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
/** | |
* Sets a value in a nested array based on path | |
* See http://stackoverflow.com/a/9628276/419887 | |
* | |
* @param array $array The array to modify | |
* @param string $path The path in the array | |
* @param mixed $value The value to set | |
* @param string $delimiter The separator for the path | |
* @return The previous value | |
*/ |
This file contains hidden or 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
@mixin flex-direction($direction: row) { | |
-webkit-flex-direction: $direction; | |
-ms-flex-direction: $direction; | |
flex-direction: $direction; | |
} | |
@mixin flex-wrap($wrap: nowrap) { | |
@if $wrap == nowrap { | |
-ms-flex-wrap: none; | |
} |
This file contains hidden or 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 | |
git pull -s recursive -X theirs origin $1 | |
RAILS_ENV=mnet_production bundle exec rake assets:precompile | |
service unicornswipe1 restart |
This file contains hidden or 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 | |
source hostlist.sh | |
hostname=`hostname` | |
private_range=$(printf ",%s" "${ips[@]}") | |
private_range=${private_range:1} | |
iptables -P INPUT ACCEPT | |
iptables -P OUTPUT ACCEPT | |
iptables -P FORWARD ACCEPT | |
iptables -F |
This file contains hidden or 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/expect -f | |
# REPLACE, <user>, <host> and <password> | |
spawn ssh <user>@<host> | |
expect "assword:" | |
send "<password>\r" | |
interact |