Skip to content

Instantly share code, notes, and snippets.

Nemanja Nedeljković nemanjan00

Block or report user

Report or block nemanjan00

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View README.md

race-condition-example

Just a simple race condition example.

View dokku.md

Dokku

Dokku je ekstremno jednostavan PaaS (platform as service) . Filozofija koje su se držali programeri dok su razvijali ovaj softver je poprilično jasna. Želeli su da naprave što jednostavniji potpuno funkcionalan klon Heroku platforme. I uspeli su u tome.

Ono što je prednost ovakvog sistema jeste to što vi ne morate (ali možete) da razmišljate o celokupnom kontejneru u kom se izvršava aplikacija već samo o aplikaciji i njenim zahtevima. Sve što treba da uradite jeste da pushujete svoj git repozitorijum i Dokku će od njega napraviti potpuno funkcionalan docker kontejner.

Šta se dešava kada pošaljem git repozitorijum?

Prvo što treba da znate o Dokkuu, Herokuu i sličnim rešenjima jeste to da oni koriste nešto što se zove buildpackovi. Buildpack je u suštini skup dodatnog softvera koji je neophodan za buildovanje i izvršavanje vaše aplikacije. Tako npr. imamo buildpack za PHP, buildpack za Python, za Ruby, etc.

View broj.php
<?php
function broj($n){
if($n == 1){
return 1;
}
if($n % 2 == 0){
return broj($n/2) - 1;
}
else
View brojevi.txt
<record from="1394631662" to="graphics/pictures/person/1394631662/portrait"/>
<record from="1394631663" to="graphics/pictures/person/1394631663/portrait"/>
<record from="1394631664" to="graphics/pictures/person/1394631664/portrait"/>
<record from="1394631665" to="graphics/pictures/person/1394631665/portrait"/>
<record from="1394631666" to="graphics/pictures/person/1394631666/portrait"/>
<record from="1394631667" to="graphics/pictures/person/1394631667/portrait"/>
<record from="1394631668" to="graphics/pictures/person/1394631668/portrait"/>
<record from="1394631669" to="graphics/pictures/person/1394631669/portrait"/>
<record from="1394631670" to="graphics/pictures/person/1394631670/portrait"/>
<record from="1394631671" to="graphics/pictures/person/1394631671/portrait"/>
View brojevi.php
<?php
for($i = 1394631662; $i <= 1394634500; $i++){
echo '<record from="'.$i.'" to="graphics/pictures/person/'.$i.'/portrait"/>'."\n";
}
View web-term-tmux.md

Idea

Structure

Workspaces

tmux actually gives unique ids for windows and they persist even when windows are reordered:

╭─nemanjan00@nemanjan00-laptop  ~  
╰─$ tmux list-windows -t turizam
1: php (1 panes) [192x53] [layout bbc5,192x53,0,0,8] @8
2: index.php (1 panes) [192x53] [layout 5e12,192x53,0,0,13] @13
View default.txt
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
View App.java
package com.mycompany.app;
import java.util.Scanner;
public class App{
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
for(int i = 0; i < str.length(); i++){
View rm.php
<?php
function rm($dir){
$list = scandir($dir);
foreach($list as $path){
$path = $dir."/".$path;
if(is_dir($path)){
rm($path);
}
View error.txt
error_log: {
"name": "TypeError",
"message": "Cannot read property 'getAttribute' of null",
"origin": "$r.comet<comet.onmessage>",
"fatal_level": 0,
"stack": [
"create_item@/v2/en-us/-/js/hon_v3/base-app.1971.js:37:15",
"Object.apply@<anonymous>:17:19",
"prepare@/v2/en-us/-/js/hon_v3/base-app.1971.js:35:31121",
"Object.apply@<anonymous>:17:19",
You can’t perform that action at this time.