Skip to content

Instantly share code, notes, and snippets.

View v0d1ch's full-sized avatar
:octocat:
compiling...

Sasha Bogicevic v0d1ch

:octocat:
compiling...
View GitHub Profile
@v0d1ch
v0d1ch / phpstorm
Created October 14, 2014 16:41
phpstorm FAST config :)
-server
-Xms128m
-Xmx750m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=96m
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+UseCodeCacheFlushing
-XX:+UseConcMarkSweepGC
@v0d1ch
v0d1ch / djuka
Created November 7, 2014 16:35
djuka
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.1.js"></script>
<div id="fajshe"></div>
<script type="text/javascript">
(function($){
var Posts=[];
$.fn.sigdeKadju= function(url){
var Obj = this;
Obj.html("<img src='https://assets-production.ratecity.com.au/assets/elements/ajax-loader-6ec0bf541aea8d741acda04ca9283bb3.gif' />");
@v0d1ch
v0d1ch / PS jsx script
Last active August 29, 2015 14:09
jsx photoshop to save every png file in subfolders as jpg
var traverseFolder = function(path)
{
// Create new folder object based on path string
var folder = new Folder(path);
// Get all files in the current folder
var files = folder.getFiles();
// Loop over the files in the files object
for (var i = 0; i < files.length; i++)
@v0d1ch
v0d1ch / select time box
Last active August 29, 2015 14:09
select time box
<select name="new-event-start">
<option value="05:00">5:00</option>
<option value="05:15">5:15</option>
<option value="05:30">5:30</option>
<option value="05:45">5:45</option>
<option value="06:00">6:00</option>
<option value="06:15">6:15</option>
<option value="06:30">6:30</option>
<option value="06:45">6:45</option>
@v0d1ch
v0d1ch / vimgist
Last active September 29, 2023 12:48
vim replace newline with comma
1,$s/\n/,/g #replace comma with new line
%norm A* #append * to every line
bufdo! %s/FIND/REPLACE/g # search all buffers
@v0d1ch
v0d1ch / vim array
Created March 31, 2015 20:56
vim create array
:for i in range(1,10) | put ='array['.i.']' | endfor
@v0d1ch
v0d1ch / vim range
Created March 31, 2015 20:58
vim range
:put =range(11,15)
@v0d1ch
v0d1ch / find_in_git.txt
Last active September 8, 2016 12:44
Find changed files in git by extension
find . -iname '*.scss' -exec git log --since=2.weeks --name-status {} +
@v0d1ch
v0d1ch / nginx-default
Last active October 9, 2020 07:46
nginx yesod setup as reverse proxy
upstream yesod {
server 127.0.0.1:3000;
keepalive 8;
}
# the nginx server instance
server {
listen 0.0.0.0:80;
server_name haskell-serbia.com;
access_log /var/log/nginx/access_yesod.log;
@v0d1ch
v0d1ch / yesodaccount-custom.hs
Created April 15, 2017 14:36 — forked from stla/authaccountcustom.hs
Yesod Auth Account custom login page
{-# LANGUAGE QuasiQuotes, TypeFamilies, GeneralizedNewtypeDeriving #-}
{-# LANGUAGE FlexibleContexts, FlexibleInstances, TemplateHaskell, OverloadedStrings #-}
{-# LANGUAGE GADTs, MultiParamTypeClasses, TypeSynonymInstances #-}
import Data.Text (Text)
import Data.ByteString (ByteString)
import Database.Persist.Sqlite
import Control.Monad.Logger (runStderrLoggingT)
import Yesod
import Yesod.Auth