Skip to content

Instantly share code, notes, and snippets.

Bojan Bjelić bojanbjelic

Block or report user

Report or block bojanbjelic

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
anonymous
anonymous / config.json
Created Jun 16, 2017
Bootstrap Customizer Config
View config.json
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "#000",
"@brand-success": "#cecece",
View Grid_textures_01.pde
int gap = 20;
void setup() {
size(1000, 1000);
strokeWeight(4);
strokeCap(SQUARE);
frameRate(0.5);
}
void draw() {
@hactar
hactar / wl.json
Last active Oct 18, 2017
Wiener Linien JSON version of the Wiener Linien - Real Time CSV Data (https://open.wien.at/site/datensatz/?id=add66f20-d033-4eee-b9a0-47019828e698) This file is generated using the WL Generator Tool (https://github.com/hactar/WL-Generator)
View wl.json
[
{
"stationID":"214460106",
"relatedLines":"6",
"latitude":"48.1737831466666",
"name":"Absberggasse",
"longitude":"16.3897519115987",
"platforms":[
{
"line":"6",
@bojanbjelic
bojanbjelic / flushdns.sh
Created Dec 2, 2012
mac osx lion flush DNS cache
View flushdns.sh
sudo killall -HUP mDNSResponder
@bojanbjelic
bojanbjelic / rss-dl-mp3.sh
Created Nov 19, 2012
download mp3s from a rss feed
View rss-dl-mp3.sh
wget [RSS URL]
grep -e '[^"]*\.mp3' [downloaded RSS] | grep -o '[^"]*\.mp3' '-' >> list.txt
wget -i list.txt
@bojanbjelic
bojanbjelic / gist:3931503
Created Oct 22, 2012
jQuery ajax wait pattern
View gist:3931503
function getTwoThings( callback ) {
var peopleRequest = $.getJSON( '/data/people.json' );
var taskRequest = $.getJSON( '/data/tasks.json' );
$.when( peopleRequest, taskRequest )
.done(function( people, tasks ) {
callback( people[0].people, tasks[0].tasks );
});
}
@jongalloway
jongalloway / CreateAdminUser.cs
Created Aug 23, 2012
I wanted to create an administrative user in an MVC 4 tutorial using a drop in code file (just throw in App_Start folder and it'll create the user on first run). Normally I'd use WebActivator for PostApplicationStart, but I wanted to make this just a simp
View CreateAdminUser.cs
using Mvc4SampleApplication.Filters;
using System.Web;
using System.Web.Security;
using WebMatrix.WebData;
[assembly: PreApplicationStartMethod(typeof(PreApplicationTasks), "Initializer")]
public static class PreApplicationTasks
{
public static void Initializer()
@johannesnagl
johannesnagl / Tweetsheets
Created Aug 9, 2012
Use Twitter directly in your Google Doc, so no one will ever blame you for being social
View Tweetsheets
var CONSUMER_KEY = "<< YOUR KEY HERE >>";
var CONSUMER_SECRET = "<< YOUR SECRET HERE >>";
function getConsumerKey() {
return CONSUMER_KEY;
}
function getConsumerSecret() {
return CONSUMER_SECRET;
}
@simX
simX / hidpi.txt
Created Jul 28, 2012
Enable HiDPI mode in Mountain Lion w/o Quartz Debug
View hidpi.txt
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES;
sudo defaults delete /Library/Preferences/com.apple.windowserver DisplayResolutionDisabled;
// by the way, you need to logout and log back in for this to take effect. Or at least that's what
// Quartz Debug says. Who knows, maybe it's lying?
// P.S. Go to [Apple menu --> System Preferences --> Displays --> Display --> Scaled] after logging
// back in, and you'll see a bunch of "HiDPI" resolutions in the list to choose from.
@bojanbjelic
bojanbjelic / .htaccess
Created Apr 20, 2012 — forked from necolas/.htaccess
Simple, quick way to concatenate, minify, and version static files in a Wordpress theme
View .htaccess
# Filename-based cache busting
# taken from https://github.com/h5bp/html5-boilerplate/
# This rewrites file names of the form `name.123456.js` to `name.js`
# so that the browser doesn't use the cached version when you have
# updated (but not manually renamed) the file.
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
You can’t perform that action at this time.