Skip to content

Instantly share code, notes, and snippets.

@alexcode
alexcode / 55-bytes-of-css.md
Created September 25, 2022 21:15 — forked from JoeyBurzynski/55-bytes-of-css.md
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@alexcode
alexcode / set_version.sh
Last active March 19, 2019 16:58
Nativescript. Retrieve version from package.json and set AndroidManifest.xml and Info.plist.
#!/bin/sh
# First param can be th project root directory
if [ $1 != "" ]; then
PROJ_DIR=$1
else
PROJ_DIR=.
fi
PACKAGE_FILE=${PROJ_DIR}/package.json
@alexcode
alexcode / 03_s3fs.config
Created June 26, 2018 13:31 — forked from mattzuba/03_s3fs.config
s3fs-fuse on AWS Elastic Beanstalk
packages:
yum:
gcc: []
libstdc++-devel: []
gcc-c++: []
fuse: []
fuse-devel: []
libcurl-devel: []
libxml2-devel: []
openssl-devel: []
#include <Ultrasonic.h>
#include <Servo.h>
#define DISTANCE_PIN 6
#define SERVO_PIN 7
#define SERVO2_PIN 10
#define PIN_MOVE 11
Ultrasonic ultrasonic(DISTANCE_PIN);
Servo focusServo; // create servo object to control a servo
#include <Ultrasonic.h>
Ultrasonic ultrasonic(7);
void setup()
{
Serial.begin(9600);
}
void loop()
{
build:
# Get all back dependencies
backdependencies:
image: composer/composer
commands:
- composer install
# Get all front dependencies and compile them
frontdependencies:
image: node
commands:
@alexcode
alexcode / laravel.js
Created February 1, 2016 10:49 — forked from soufianeEL/laravel.js
You use Laravel 5 and you want to send a DELETE request without creating a form? This will handle the form-creation bits for you dynamically, similar to the Rails implementation. To use, import script, and create a link with the `data-method="DELETE"` and `data-token="{{csrf_token()}}"` attributes.
/*
Exemples :
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}">
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}" data-confirm="Are you sure?">
*/
(function() {
http://www.facebook.com/dialog/feed?
app_id=180157518663220&
link=http://bugs.fbdublin.com&
picture=http://colmd.fbdublin.com/socialPlugins/BugsLifeWallpaper800.jpg&
name=Facebook%20Dialogs&
caption=Reference%20Documentation&
description=Dialogs%20provide%20a%20simple,%20consistent%20interface%20for%20applications%20to%20interact%20with%20users.&
message=Facebook%20Dialogs%20are%20so%20easy!&
redirect_uri=http://bugs.fbdublin.com&
source=http://colmd.fbdublin.com/socialPlugins/tangramone.swf