Skip to content

Instantly share code, notes, and snippets.

@tadija
tadija / gist:4062428
Created November 12, 2012 22:29
HTML: Bootstrap template
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hello</title>
<link rel="stylesheet" href="media/css/bootstrap.min.css"/>
</head>
<body>
<h1>Hello, world!</h1>
@tadija
tadija / gist:4178221
Created November 30, 2012 20:08
CI: Routes template
$route['default_controller'] = "pages";
$route['backend/(:any)'] = "backend/$1";
$route['(:any)'] = "pages/$1";
$route['404_override'] = '';
@tadija
tadija / gist:4178243
Created November 30, 2012 20:10
CI: .htaccess template
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /path/project_name/
# dynamic sitemap.xml
RewriteRule sitemap.xml sitemap.php [L]
### Canonicalize codeigniter URLs
@tadija
tadija / gist:4754959
Last active December 12, 2015 09:49
JS: google map with place data
// set google maps
function initGoogleMaps() {
var loc, map, opt, id, ref;
// whole map
loc = new google.maps.LatLng(44.826535, 20.384703);
opt = {
zoom: 14,
scrollwheel: false,
@tadija
tadija / gist:5795453
Created June 17, 2013 08:30
VBA: F2 + Enter on selected cells
Sub RefreshCells()
Dim r As Range, rr As Range
Set rr = Selection
For Each r In rr
r.Select
Application.SendKeys "{F2}"
Application.SendKeys "{ENTER}"
DoEvents
Next
End Sub
@tadija
tadija / gist:26582054b50aebe41ae6
Last active August 29, 2015 14:02
SKETCH: object dump and instance methods
var s = selection[0];
print("————————————————————————————————");
print("object dump");
print("————————————————————————————————\n");
log(s.treeAsDictionary());
print("————————————————————————————————");
print("instance methods");
print("————————————————————————————————\n");
@tadija
tadija / gist:5fa3096c4256bbbea0eb
Created June 15, 2014 19:52
SKETCH: explore menu actions
function logMenu(menu) {
var count = [menu numberOfItems];
for (var n = 0; n < count; ++n) {
var item = [menu itemAtIndex:n];
if (![item isSeparatorItem]) {
log([item class]);
if ([item hasSubmenu]) {
logMenu([item submenu]);
} else {
var action = NSStringFromSelector([item action]);
@tadija
tadija / git-cleanup.sh
Last active December 21, 2020 09:32
Git Cleanup
# https://github.com/CocoaPods/cocoapods-deintegrate
# http://stackoverflow.com/a/17824718/2165585
# http://stevelorek.com/how-to-shrink-a-git-repository.html
# http://naleid.com/blog/2012/01/17/finding-and-purging-big-files-from-git-history
# https://github.com/zuha/Zuha/wiki/Git-Reduce-Repo-Size
git stash clear
pod deintegrate
@tadija
tadija / Xcode Semi-Automatic Versioning.md
Last active August 11, 2022 19:55
Xcode Semi-Automatic Versioning | Bump Build Number | Bump Version Number

Xcode Semi-Automatic Versioning

Instructions:

First Things First

In order for agvtool to work properly you must first set
Project Settings / Build Settings / Versioning / Versioning System to Apple Generic.

Bump Build Number

  1. Create new shared scheme 'Bump Build Number'
@tadija
tadija / FontNames-iOS-17.4.swift
Last active May 31, 2024 19:23
iOS - All Font Names
/*
*** Academy Engraved LET ***
AcademyEngravedLetPlain
---------------------
*** Al Nile ***
AlNile
AlNile-Bold
---------------------
*** American Typewriter ***
AmericanTypewriter