Skip to content

Instantly share code, notes, and snippets.

View hajro92's full-sized avatar
💭
I may be slow to respond.

Hajrudin hajro92

💭
I may be slow to respond.
  • WiracNET
  • Gračanica, Bosnia & Herzegovina
View GitHub Profile
@hajro92
hajro92 / teamviewer.md
Created November 27, 2020 10:22 — forked from happyincent/teamviewer.md
Install TeamViewer without a connected monitor (Xubuntu 16.04 & 18.04)

Install

wget https://download.teamviewer.com/download/linux/teamviewer_amd64.deb
sudo apt update -y
sudo apt install gdebi -y
sudo gdebi teamviewer_amd64.deb

sudo teamviewer passwd PASSWORD_TO_BE_CHANGED
sudo teamviewer daemon enable
teamviewer info
@hajro92
hajro92 / template.html
Created October 29, 2017 11:53 — forked from nmwalsh/template.html
Facebook Instant Article Template
<!doctype html>
<html lang="en" prefix="op: http://media.facebook.com/op#">
<head>
<meta charset="utf-8">
<!-- URL of the web version of this article -->
<!-- TODO: Change the domain to match the domain of your website -->
<link rel="canonical" href="http://example.com/article.html">
<meta property="op:markup_version" content="v1.0">
</head>
<body>
@hajro92
hajro92 / yosemite-subl
Created July 5, 2017 17:44 — forked from jadaradix/yosemite-subl
Fix Sublime's "subl" command on OS X Yosemite.
rm /usr/local/bin/subl;
sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl;
(function(window, location) {
history.replaceState(null, document.title, location.pathname+"#!/history");
history.pushState(null, document.title, location.pathname);
window.addEventListener("popstate", function() {
if(location.hash === "#!/history") {
history.replaceState(null, document.title, location.pathname);
setTimeout(function(){
location.replace("http://www.website.com");
},0);
// CONFIG ////////////////
var initialBetAmount = 1;
var mode = 'martingale'; // can be 'martingale' or 'anti-martingale' (WAT? https://en.wikipedia.org/wiki/Martingale_(betting_system) )
var betColor = 'red'; // can be 'red' or 'black'
//////////////////////////
function tick(){var a=getStatus();if(a!==lastStatus&&"unknown"!==a){switch(a){case"waiting":bet();break;case"rolled":rolled()}lastStatus=a,printInfo()}}function checkBalance(){return getBalance()<currentBetAmount?(console.warn("BANKRUPT! Not enough balance for next bet, aborting."),clearInterval(refreshIntervalId),!1):!0}function printInfo(){var a=" \nStatus: "+lastStatus+"\nRolls played: "+currentRollNumber+"\nInitial bet amount: "+initialBetAmount+"\nCurrent bet amount: "+currentBetAmount+"\nLast roll result: "+(null===wonLastRoll()?"-":wonLastRoll()?"won":"lost");console.log(a)}function rolled(){return"anti-martingale"===mode?void antiMartingale():(martingale(),void currentRollNumber++)}function antiMartingale(){currentBetAmount=wonLastRoll()
@hajro92
hajro92 / CasperJS-PhantomJs
Created May 29, 2016 14:31 — forked from raging/CasperJS-PhantomJs
My personal linux setup preferences
https://github.com/marten-cz/casperjs-deb --
sudo add-apt-repository ppa:martin.malek/testing && sudo apt-get update && sudo apt-get install casperjs
tep 1: Installing PhantomJS
- Download the latest source
wget http://phantomjs.googlecode.com/files/phantomjs-1.8.2-linux-x86_64.tar.bz2
<?php
$before = "1462871236"; // time from mysql
$now = time();
$diff = $now - $before;
if( 1 > $diff ){
exit('Target Event Already Passed (or is passing this very instant)');
} else {
$w = $diff / 86400 / 7;
$d = $diff / 86400 % 7;
@hajro92
hajro92 / spintax.php
Created May 4, 2016 23:29 — forked from irazasyed/spintax.php
PHP: Text Spinner Class - Nested spinning supported.
<?PHP
/**
* Spintax - A helper class to process Spintax strings.
* @name Spintax
* @author Jason Davis - https://www.codedevelopr.com/
* Tutorial: https://www.codedevelopr.com/articles/php-spintax-class/
*/
class Spintax
{
public function process($text)
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly