Skip to content

Instantly share code, notes, and snippets.

View nokimaro's full-sized avatar

Nik Dm nokimaro

View GitHub Profile
#!/bin/bash
# https://github.com/andreimatei/congratboto/blob/master/tools/fb-login.sh
# If it redirects to http://www.facebook.com/login.php at the end, wait a few minutes and try again
EMAIL='[email protected]'
PASS='pwd'
COOKIES='cookies.txt'
# USER_AGENT='Firefox/25'
@nokimaro
nokimaro / LICENSE.txt
Created December 18, 2016 01:58 — forked from dciccale/LICENSE.txt
Detect if Flash Player is installed in your browser (120bytes)
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Denis Ciccale <http://webdecs.wordpress.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@nokimaro
nokimaro / is_popup_window.js
Created December 18, 2016 01:58 — forked from donut/is_popup_window.js
Is popup window
// Try to guess if the current window is a "popup"
window.isPopup =
window.isPopup || window.opener ||
(window.locationbar && window.locationbar.visible === false) ||
false;
@nokimaro
nokimaro / utserver
Created December 17, 2016 20:04
utserver init.d script
#!/bin/bash
### BEGIN INIT INFO
# Provides: utserver
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start or stop the utserver.
### END INIT INFO
@nokimaro
nokimaro / m3u.php
Created December 4, 2016 13:29
Recursive scan dirs and generate m3u for samsung tv
<?php
setlocale(LC_ALL,'ru_RU.UTF-8');
$SCAN_DIR = __DIR__.'/dl';
$BASE_URL = 'https://deejay.su';
//допустимые форматы видео
$available_formats = array('avi', 'mp4', 'mkv', 'wmv', 'mov', 'mpg', 'mpeg', 'flv');
$video_files = [];
var _parent = self,
bSimple = false,
popunder;
if (top != self) {
try {
if (top.document.location.toString()) {
_parent = top;
}
}
@nokimaro
nokimaro / popunder.md
Created September 13, 2016 21:15
popunder.md

###Важно! Необходимо перед установкой данного кода, удалить наш старый код

<script async src="http://show.octobird.com/ob.js"></script>
<div class="octobird-block" 
    data-site-id="3510" 
    data-ad-type="img" 
    data-ad-number="1"></div>

Для отображения собственной рекламы, при отсутствии рекламы из octobird, добавляется параметр passback с собственным обработчиком.

<div class="octobird-block"></div>

<script type="text/javascript">
    var _ob = {
        sid: YOUR_SITE_ID,
        passback: function () {
            //ЗДЕСЬ РЕАЛИЗУЕТСЯ ВАША ЛОГИКА, КОТОРАЯ ВЫПОЛНЯЕТСЯ ПРИ ОТСУТСТВИИ РЕКЛАМЫ В OCTOBIRD 
 console.log('Octobird does not have any ads');