Skip to content

Instantly share code, notes, and snippets.

View sebbdk's full-sized avatar
Developing ad libitum

Sebastian Vargr sebbdk

Developing ad libitum
View GitHub Profile
@sebbdk
sebbdk / gist:dc897166aafbe8e80e43
Last active August 29, 2015 14:10
Scroll scale/position fix
<div class="scroll-dialog">
<img src="header.png" style="width: 100%;" />
<div class="scroll-content"></div>
<img src="footer.png" style="width: 100%;" />
</div>
.scroll-dialog {
width: 80%;
@sebbdk
sebbdk / gist:653c193e84d3cfe2da1f
Last active August 29, 2015 14:10
Button example
<a href="#" class="bg-btn">
<img src="icon_and_text.png">
</a>
Then you can do this in css:
.bg-btn {
background-image: url(img/redbg.png);/* grap a slice of the gridient here and have it repeat horizontally*/
border-radius: 10px
box-shadow: 0 0 0 10px 10px rgba(0,0,0,0.5);
@sebbdk
sebbdk / gist:d3b383bf2be557990dd1
Last active August 29, 2015 14:03
ridiculous!
if (is_admin())
{
if ($options['adminsort'] == "1" &&
//ignore when ajax Gallery Edit default functionality
!($options['adminsort'] == "1" && defined('DOING_AJAX') && isset($_REQUEST['action']) && $_REQUEST['action'] == 'query-attachments')
)
{
$orderBy = "{$wpdb->posts}.menu_order, {$wpdb->posts}.post_date DESC";
}
@sebbdk
sebbdk / gist:3b9f43850a1f10b0a459
Last active August 29, 2015 14:02
Henrik code
foreach ($artikler as $row) {
$link = htmlspecialchars($row['link']);
$titel = $row['title'];
$date = $row['date'];
$author = $row['rss_title'];
$findlinkQry = "SELECT * FROM rss_artikler WHERE link = '$link'";
$result = mysql_query($findlinkQry) or die(mysql_error());
if(mysql_num_rows($result) === 0) {//if the link does not exist, add it, then find it
#!/bin/bash
# This script creates a new project (or site) under /var/sites and creates
# new virtual host for that site. With the options a site can also
# install the latest version of Laravel directly.
# This script was originally based on the following script by @Nek from
# Coderwall: https://coderwall.com/p/cqoplg
# Display the usage information of the command.
create-project-usage() {
# Debian LAMP Stack (Zsh script)
# Author: Christopher Riding
sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt-get install -y wajig && wajig install -y vim && wajig install apache2 mysql-server && mysql_secure_installation && wajig install php5 php-pear php5-curl php5-mysql
echo "ServerName localhost" >> /etc/apache2/conf.d/name
sudo a2enmod rewrite
sudo service apache2 restart
# Add vhosts
package dk.sebb.scenes
{
import flash.display.Bitmap;
import flash.display.MovieClip;
import flash.events.Event;
import flash.geom.Point;
/**
* ...
* @author Sebb
#!/bin/bash
# Script for creating Virtual Servers On Apache
# Check for the correct parameters
if [ $# -eq 0 ]; then
echo 'domain param missing'
echo 'example: create-site your-domain.com'
exit 0
fi
@sebbdk
sebbdk / gist:6417881
Created September 2, 2013 22:33
Game mechanics/effects
Sneak
Stad still when looked at
Crouch / walk slow
Stay out of the light
Alarms
Distractions
Throw rock
Activate alarm
Puzzle
@sebbdk
sebbdk / gist:6359136
Last active December 21, 2015 20:09
portential game features
Feature brainstorm For my game:
http://www.ludumdare.com/compo/ludum-dare-27/?action=preview&uid=24416
Missing, Will be added:
Narration
Sound
Potential Features
Pause game
Different types of shots