Skip to content

Instantly share code, notes, and snippets.

@xavianaxw
xavianaxw / pre-commit
Last active August 9, 2022 23:57
Git hook to compile blendid assets on file change only
#!/bin/bash
# flag to see if compiling is required
should_precompile=0
wp_directory="wp-content/themes/securepay"
# check if there are changes
# wp-content/themes/securepay/css/*
if git diff-index --name-only HEAD | egrep "$wp_directory/css" >/dev/null ; then
should_precompile=1
@rolandstarke
rolandstarke / laravel setup.sh
Last active June 27, 2024 13:37
Server setup bash script for Laravel
# Ubuntu 20 LTS Server Setup for Laravel
# Login as root user
sudo su -
# Update list of available packages
apt update
@revooms
revooms / README.md
Last active July 22, 2018 15:12
A gist blog. About gistblog.

Powered by gistblog

@revooms
revooms / shutdown.bat
Last active October 7, 2018 00:33
Windows shutdown
shutdown /s /t 7200
# shutdown /a - Aborts shutdown
@cbednarski
cbednarski / factorio.md
Last active April 3, 2024 01:14
Host a factorio server
@magicznyleszek
magicznyleszek / jekyll-and-liquid.md
Last active January 12, 2024 03:46
Jekyll & Liquid Cheatsheet

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes:

@devcutter
devcutter / entity.lua
Last active October 3, 2016 00:12
Starbound Lua API will keep updated :
--- Stubs for entity.* callbacks defined in C++.
--
-- DO NOT INCLUDE this file in your scripts, it is for documentation purposes only.
--
-- Entity callbacks query and mutate the specific entity that is running the
-- lua script. They can be called from a _different_ entity using
-- world.callScriptedEntity(targetEntityId, "entity.*"), replacing "*" with the
-- name of a function defined below.
--
-- Specific types of entities (e.g. NPCs, Objects) define different sets of
@McSimp
McSimp / items.json
Last active October 3, 2016 00:11
All items in Starbound (excluding generated items) for Offended Koala
{
"back": {
"toxicwasteback": {
"iconPath": "items/armors/backitems/toxicwaste/toxicwastebackicon.png",
"itemPath": "items/armors/backitems/toxicwaste/toxicwaste.back"
},
"ironarmoravianback": {
"iconPath": "items/armors/avian/ironarmoravian/icons.png:back",
"itemPath": "items/armors/avian/ironarmoravian/ironarmoravian.back"
},
@jasonlewis
jasonlewis / create-project.sh
Last active June 18, 2024 01:35
Bash script that creates a new project and virtual host for that project. Can also be used to quickly create a new Laravel project.
#!/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() {
@fracasula
fracasula / getMp3StreamTitle.php
Last active April 24, 2024 00:38
How to get the MP3 metadata (StreamTitle) from a streaming URL
<?php
/**
* Please be aware. This gist requires at least PHP 5.4 to run correctly.
* Otherwise consider downgrading the $opts array code to the classic "array" syntax.
*/
function getMp3StreamTitle($streamingUrl, $interval, $offset = 0, $headers = true)
{
$needle = 'StreamTitle=';
$ua = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36';