Skip to content

Instantly share code, notes, and snippets.

View nikola-bodrozic's full-sized avatar

Nikola Bodrožić nikola-bodrozic

  • Belgrade, Serbia
View GitHub Profile
import React, { Component } from "react";
import axios from "axios";
class Comments extends Component {
constructor(props) {
super(props);
this.state = {
postId: '',
commentBody:''
};
@nikola-bodrozic
nikola-bodrozic / script.sql
Last active December 1, 2018 18:15
Oracle Flashback
-- as admin
CREATE TABLESPACE fda_ts DATAFILE 'fda_ts_tabspace' SIZE 10M AUTOEXTEND ON NEXT 1M;
ALTER USER scott QUOTA UNLIMITED ON fda_ts;
CREATE FLASHBACK ARCHIVE fda_1month TABLESPACE fda_ts QUOTA 15M RETENTION 1 MONTH;
GRANT FLASHBACK ARCHIVE ON fda_1month TO scott;
GRANT FLASHBACK ARCHIVE ADMINISTER TO scott;
GRANT EXECUTE ON DBMS_FLASHBACK_ARCHIVE TO scott;
GRANT CREATE ANY CONTEXT TO scott;
hg branch newfeature && hg ci -m "start feature branch" - create branch
hg update default - switch to default branch
hg merge newfeature - merge newfeature into default
// echo sprintf("<script>console.debug(\"%s --- %s --- %s\");</script>", __FILE__, __METHOD__, $json_encode($array));
hg update -r 500 && hg branch newbranch && hg commit -A -m 'made a new branch from revision 500'
hg add . && hg commit -A -m "alert" && hg push
hg log -l 3
hg incoming -> hg pull -> hg heads -> hg merge -> hg commit -A -m "" -> hg push
Get-ChildItem D:\folder\*.* | Select-Object FullName | Export-Csv list.csv -NoTypeInformation
@nikola-bodrozic
nikola-bodrozic / lufthansa-rest-api.php
Created November 12, 2017 16:51
Lufthansa REST API
<?php
// Lufthansa REST API with OAuth
// exchange client_id and client_secret for the token
$post = [
'client_id' => 'Your client Id',
'client_secret' => 'Your client secret',
'grant_type' => 'client_credentials',
];
$ch = curl_init();
@nikola-bodrozic
nikola-bodrozic / List numeric permissions.txt
Created October 13, 2017 18:10
List numeric permissions
ls -la | awk '{k=0;for(i=0;i<=8;i++)k+=((substr($1,i+2,1)~/[rwx]/)*2^(8-i));if(k)printf("%0o ",k);print}'