Skip to content

Instantly share code, notes, and snippets.

View akosbalogh's full-sized avatar
:shipit:
Working from home

Akos Balogh akosbalogh

:shipit:
Working from home
View GitHub Profile
@chasewoodford
chasewoodford / style.scss
Created June 16, 2012 02:12 — forked from saucer-jp/style.scss
sass:mixin fadeIn
$prefix:'-moz-', '-webkit-', '-o-', '-ms-', '';
// ********************
// fadeIn
// ********************
@mixin keyframe-fadeIn {
0% { opacity:0; }
100% { opacity:1; }
}
@-moz-keyframes fadeIn {
@include keyframe-fadeIn;
@yoggy
yoggy / sdl_gfx_sample.c
Created August 14, 2012 02:49
SDL_gfx sample program
//
// SDL_gfx sample program...
// http://www.ferzkopp.net/Software/SDL_gfx-2.0/
//
// for mac:
// $ brew install sdl
// $ brew install sdl_gfx
// $ gcc -g -framework Cocoa -lSDL_gfx -lSDLmain -lSDL -o sdl_gfx_sample sdl_gfx_sample.c
//
#include <SDL/SDL.h>
@JacobBennett
JacobBennett / blog.md
Last active March 26, 2021 02:47
API Token Authentication in Laravel 5.2 & 5.3

I recently had the need to write a small url shortening application. I am aware that this problem has been solved quite a few times before, but what is being a developer if not reinventing the wheel just for the heck of it? Custom CMS anyone?

Knowing that this was going to be a tiny RESTful API and also knowing that Laravel 5.2 had API rate limiting built in, I was eager to give it a try. Taylor Otwell being Taylor Otwell shipped 5.2 with the rate limiting defaults set up out of the box and I had my application building out short url's in a matter of minutes. The problem for me came when I wanted to start associating those short urls with a user.

Typically my applications have a UI and authentication is done through a simple login page. Obviously for a RESTful API, having a login page isn't ideal. Instead, my hope was to have users append an api_token to the end of their query string and use that to auth

@ankurk91
ankurk91 / install_lamp_ubuntu.sh
Last active July 6, 2024 03:45
Ubuntu 22/24 - PHP development (php 7.4 / 8.3, apache 2.4)
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Ubuntu Server
# Run like (without sudo) - bash install_lamp.sh
# Script should auto terminate on errors
export DEBIAN_FRONTEND=noninteractive