Skip to content

Instantly share code, notes, and snippets.

View lajlev's full-sized avatar

Michael Lajlev lajlev

View GitHub Profile
@lajlev
lajlev / index.html
Created January 13, 2013 15:44
New index, with facebook like box in sidebar, video and screenshot of article added.
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="da">
<head>
<title>Konepasning.dk - Leverer hvor andre svigter</title>
<link rel="stylesheet" type="text/css" href="reset.css" media="all" />
<link rel="stylesheet" type="text/css" href="grid.css" media="all" />
<link rel="stylesheet" type="text/css" href="style.css" media="all" />
@lajlev
lajlev / style.css
Created January 13, 2013 15:44
Small changes
.right {
float: right;
}
.left {
float: left;
}
body {
background: #f4f4f3 none repeat scroll 0%;
@lajlev
lajlev / fb-styles.css
Last active December 14, 2015 06:58
Clean styles for facebook.com
/* Install Stylebot chrome extension or similar */
#navSearch .uiSearchInput {
border-top: none; }
#navSearch .uiTypeahead {
background: none;
border: none; }
.fbx.home #blueBar #pageHead {
@lajlev
lajlev / holder_js_helper.rb
Last active December 14, 2015 20:08
Holder.js helper for middleman. Holder.js works offline.
# Require holder.js https://github.com/imsky/holder
def holder(width, height)
color = ("%06x" % rand(0..0xffffff))
return '<img data-src="holder.js/' + width.to_s + 'x' + height.to_s + '/auto/#' + color.to_s + ':#' + color.to_s + '">'
end
@lajlev
lajlev / multiple-rename-files-terminal
Created April 12, 2013 00:22
Multiple rename files in terminal
num=0
for j in *.*
do
mv "$j" `printf "fb.%01d.jpg" $num`
num=`echo "$num + 1" | bc`
done
#set zeros on %01d
#You can set filename instead of *.*
# Do the following command
# Ref: http://soderlind.no/archives/2011/08/26/running-wordpress-locally-on-mac-os-x-lion/
# Chown / Chmod wordpress folder
$ sudo chown -R :_www wordpress
$ sudo chmod -R g+w wordpress
# Add to "wp-config.php"
define('FS_METHOD', 'direct');
@lajlev
lajlev / wp-ftp-access-req.txt
Created May 1, 2013 08:06
Avoid req FTP access wordpress locally
1. Create php file in root folder. fx _www
<?php echo(exec("whoami")); ?>
2. Run in terminal
chown -R [whoami output]: [root folder]
@lajlev
lajlev / .htaccess
Created May 1, 2013 12:56
Fetch wordpress uploads from production.
# Attempt to load files from production if they're not in our local version. Put this file in "wp-content/uploads" folder.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) http://cfdp.dk/wordpress/wp-content/uploads/$1
</IfModule>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Page</title>
<style>
body {
background: pink;
}
iframe {
@media screen and (min-width: 32em) {
.content .schedule-component {
float: left;
width: 100%;
position: relative;
}
.content .schedule-component ul,
.content .schedule-component li {
list-style: none;
position: absolute;