Skip to content

Instantly share code, notes, and snippets.

View skounis's full-sized avatar

Stavros Kounis skounis

View GitHub Profile
@skounis
skounis / .htaccess
Created March 31, 2014 07:43
Drupal /tmp .htaccess / SA 2006 006
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Deny from all
# Turn off all options we don't need.
Options None
Options +FollowSymLinks
# Set the catch-all handler to prevent scripts from being executed.
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
<Files *>
@skounis
skounis / embed.js
Created July 25, 2015 09:58
test for embed
function(){
console.log('hello!');
}
@skounis
skounis / shoutcastionic-package.json
Created October 5, 2015 10:34
Shoutcast Ionic Tutorial - package.json
{
"locator": "https://github.com/keosuofficial/cordova-audio-stream-plugin.git",
"id": "com.keosu.cordova.stream"
}
@skounis
skounis / shoutcastionic-tab.html
Last active October 5, 2015 10:37
Shoutcast Ionic Tutorial - Player's tab
<!-- Stream Tab -->
<ion-tab title="Player" icon-off="icon ion-headphone" icon-on="icon ion-headphone" href="#/tab/stream">
<ion-nav-view name="tab-stream"></ion-nav-view>
</ion-item>
@skounis
skounis / shoutcastionic-app.js
Created October 5, 2015 10:37
Shoutcast Ionic Tutorial - Tabs routing
.state('tab.stream', {
url: '/stream',
views: {
'tab-stream': {
templateUrl: 'templates/tab-stream.html',
controller: 'StreamController as vm'
}
}
});
@skounis
skounis / shoutcastionic-tab-stream-step-1.html
Last active October 5, 2015 11:26
Shoutcast Ionic Tutorial - Stream tab step-1
<ion-view view-title="Stream">
<ion-content class="stream-background center">
<a class="button button-icon icon play-button-icon {{ vm.isPlaying ? 'ion-ios-pause' : 'ion-ios-play' }}"
ng-click="vm.togglePlay()"></a>
</ion-content>
</ion-view>
@skounis
skounis / shoutcastionic-style.css
Created October 5, 2015 10:40
Shoutcast Ionic Tutorial - Styles
.stream-background {
background: url('../images/ionic.jpg') center center;
background-size: cover;
}
.play-button-icon.icon:before {
font-size: 200px;
color: wheat;
}
@skounis
skounis / shoutcastionic-stream-controller.js
Created October 5, 2015 10:41
Shoutcast Ionic Tutorial - Stream Controller
.controller('StreamController', function($interval, streamService) {
var isPlaying = false;
var stream;
var timer;
var vm = angular.extend(this, {
togglePlay: togglePlay,
isPlaying: isPlaying,
info: null
});
@skounis
skounis / shoutcastionic-7.html
Created October 5, 2015 10:44
Shoutcast Ionic Tutorial - 7.html
<HTML>
<head>
<meta http-equiv="Pragma" content="no-cache">
</head>
<body>289,1,576,30000,286,128,idobi - idobi 120</body>
</html>
@skounis
skounis / shoutcastionic-parseShoutcastResponse.js
Last active October 5, 2015 11:31
Shoutcast Ionic Tutorial - Parse 7.html
function parseShoutcastResponse(html) {
var content = html.match(contentRegex)[1];
var parts = content.split(',');
if (parts.length < 7 || !parts[6]) {
return null;
}
return parts[6];
}