Skip to content

Instantly share code, notes, and snippets.

View Vlasterx's full-sized avatar
🛸
Working from mothership

Vladimir Jovanović Vlasterx

🛸
Working from mothership
  • Open Law Library
  • Belgrade, Serbia
  • 13:31 (UTC +02:00)
View GitHub Profile
@Takazudo
Takazudo / dynamic_gplus.js
Created March 1, 2012 11:54
put google plus button dynamically
var gplusoneLoaded = false;
// gplus
var $gplus = $('#somewhere'); // the src is like <div id="somewhere"><!-- put plus button here! --></div>
if($gplus.size()){
window.___gcfg = {lang: 'ja'};
$gplus.html('<div class="g-plusone" data-size="medium" data-href="' + window.location.href + '"></div>');
if(!gplusoneLoaded){
gplusoneLoaded = true;
$.getScript("https://apis.google.com/js/plusone.js");
@hdragomir
hdragomir / sm-annotated.html
Last active June 13, 2024 03:01
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
@grakic
grakic / ePorezi-macOS.md
Last active July 1, 2024 14:20
ePorezi na macOS

ePorezi na macOS

Zvanična klijentska aplikacija Poreske uprave se može preuzeti sa njihove stranice.

U pitanju je Java aplikacija koja dolazi sa posebno priređenom distribucijom Oracle Java radnog okruženja. Aplikacija podržava samo Microsoft Windows operativni sistem i sertifikatima u Personals skladištu pristupa kroz Microsoft CryptoAPI koji poziva operacije na pametnoj kartici ili tokenu posredstvom midlvera.

Sertifikaciono telo Pošte korisnicima nudi SafeSign midlver, osim u verziji za Windows i u verziji za GNU/Linux i macOS operativne sisteme. Midlver isporučuje prateću aplikaciju za upravljanje karticom/tokenom i PKCS#11 biblioteku. Programi poput jSignPDF, Adobe Reader ili LibreOffice mogu da učitaju ovu biblioteku i omoguće korisniku elektronsko potpisivanje dokumenata.

Elektronsko potpisivanje se koristi i na portalu ePorezi Poreske uprave, posredstvom pomenute klijentske aplikacije.

// ==UserScript==
// @name @chaoticvibing Twitter Blue Nerd - twitter.com
// @namespace Violentmonkey Scripts
// @match *://*.twitter.com/*
// @match *://*.x.com/*
// @grant none
// @version 1.9.2
// @author @chaoticvibing - GH @busybox11
// @description 11/9/2022, 11:45:28 PM
// @updateURL https://gist.githubusercontent.com/busybox11/53c76f57a577a47a19fab649a76f18e3/raw
@maljukan
maljukan / gist:bd8d220500158a11706cd4756890b07b
Last active January 26, 2024 14:35
Django BaseOAuth2 workaround for setting the redirect_uri to localhost
class AzureADOAuth2v2(BaseOAuth2):
# Workaround for setting the redirect_uri to localhost.
# Host is set in proxy server.py and redirect_uri takes the request host value
def get_redirect_uri(self, state=None):
"""Build redirect with redirect_state parameter."""
uri = self.redirect_uri
if self.REDIRECT_STATE and state:
uri = self.url_add_parameters(uri, {"redirect_state": state})