Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
whackashoe committed Jan 12, 2015
1 parent c1d527e commit c977ad9
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 11 deletions.
15 changes: 11 additions & 4 deletions app/database/seeds/PastesTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ public function run()
share code or get beat.
use killr to quickly paste text.
share the url - others can make modifications (under new urls) that you can see.
try it out, feel free to edit this page.
you should use this script:
#!/bin/bash
Expand All @@ -36,11 +41,12 @@ public function run()
save that to killr.sh.
save that to /usr/local/bin/killr
run chmod +x killr.sh
run chmod +x /usr/local/bin/killr
now do ./killr.sh ~/code/filetoshare
now do killr ~/code/filetoshare
or echo "sweet dude" | killr
convenient eh?
Expand All @@ -61,14 +67,15 @@ public function run()
"
]);

/*
for($i=0; $i<6; $i++) {
$p = Paste::create([
'slug' => strtolower(str_random(5)),
'code' => strtolower(str_random(rand(100, 500)))
]);
$this->tree($p->id);
}
}*/
}

private function tree($id)
Expand Down
14 changes: 14 additions & 0 deletions app/views/editor.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
@extends('layouts.default')

@section('title')
@if(!isset($paste->id))
killr.io :: paste code and text, optionally collaborate with friends or strangers
@else
killr.io :: {{ $paste->slug }} paste
@endif
@stop

@section('description')
@if(!isset($paste->id))
killr.io is the most intuitive, quick to use, and beautiful pasting and collaboration tool available.
@endif
@stop

@section('menu_items')
@if(isset($paste->ip) && strcmp($paste->ip, Request::getClientIp()) == 0)
<button id="views">views {{ $paste->views }}</button>
Expand Down
16 changes: 12 additions & 4 deletions app/views/layouts/default.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="description" content="@yield('description')">
<meta name="author" content="IcosaDev">
<link rel="icon" href="{{ asset('favicon.ico') }}">

<title>killr.io</title>
<title>@yield('title')</title>

<link href="{{ asset('build/styles.css') }}" rel="stylesheet">

Expand All @@ -18,7 +18,15 @@
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->

@yield('style')
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-42844259-4', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<menu id="mainmenu">
Expand Down
8 changes: 8 additions & 0 deletions app/views/mods.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
@extends('layouts.default')

@section('title')
killr.io :: {{ $paste->slug }} modification tree
@stop

@section('description')
view the modification tree for {{ $paste->slug }}
@stop

@section('menu_items')
@if(isset($paste->parent_slug) && !empty($paste->parent_slug))
<a href="{{ url($paste->parent_slug) }}"><button id="parent">parent</button></a>
Expand Down
Binary file modified public/favicon.ico
Binary file not shown.
18 changes: 15 additions & 3 deletions scripts/killr.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
#!/bin/bash

# killr.sh

# INSTALL
# save this file as killr.sh
# sudo cp killr.sh /usr/local/bin/killr

# USAGE
# echo "lol" | killr
# killr ~/somefile


stdin="$(ls -l /proc/self/fd/0)"
stdin="${stdin/*-> /}"

Expand All @@ -7,8 +19,8 @@ if [[ "$stdin" =~ ^/dev/pts/[0-9] ]]; then
then
echo "No filename supplied"
else
curl -X POST --data-binary @$1 http://killr.io
curl -X POST --data-binary @$1 https://killr.io
fi
else
curl -X POST --data-binary @- http://killr.io
fi
curl -X POST --data-binary @- https://killr.io
fi

0 comments on commit c977ad9

Please sign in to comment.