Skip to content

Instantly share code, notes, and snippets.

View dkgrieshammer's full-sized avatar
🎯
Focusing

David Grieshammer dkgrieshammer

🎯
Focusing
View GitHub Profile
@mandrasch
mandrasch / main.yml
Created February 7, 2021 10:55
Uberspace Github Action rsync
# /.github/workflows/main.yml
# Warning: deletes all files on uberspace which are not in repo, use without --delete if unsure
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Read more about setting it up
# https://medium.com/@ljmocic/deploying-react-application-to-aws-s3-using-github-actions-85addacaeace
on:
push:
tags:
- '*'
jobs:
build:
@danielbierwirth
danielbierwirth / TCPTestClient.cs
Last active April 27, 2024 20:24
TCP Client-Server Connection Example | Unity | C# | Bidirectional communication sample: Client can connect to server; Client can send and receive messages: Server accepts clients; Server reads client messages; Server sends messages to client
// This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/
// or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using UnityEngine;
@novemberborn
novemberborn / setup.md
Created January 7, 2016 15:05
OS X Redirect ports 80 and 443 to 8080 and 8443 respectively

Changes with .dev domains in mind.

Create /etc/pf.anchors/dev, containing:

rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443

@danharper
danharper / CatchAllOptionsRequestsProvider.php
Last active April 20, 2024 01:53
Lumen with CORS and OPTIONS requests
<?php namespace App\Providers;
use Illuminate\Support\ServiceProvider;
/**
* If the incoming request is an OPTIONS request
* we will register a handler for the requested route
*/
class CatchAllOptionsRequestsProvider extends ServiceProvider {
@ian-cox
ian-cox / fields.php
Created February 13, 2015 20:19
Adding panel fields to front end Kirby templates
<?php if($user = $site->user() and $user->hasRole('admin')):?>
<form autocomplete="off" class="form" method="post" action="/panel/api/pages/update/<?php echo kirby()->request()->path();?>">
<label class="label" for="form-field-title">Title</label>
<input autocomplete="on" class="input" id= "form-field-title" name="title" required="" type="title" value="<?php echo $page->title() ?>">
<input type="submit" value="Save">
</form>
<?php endif;?>
@visnup
visnup / lock.css
Created May 5, 2012 20:31
"lock" orientation of a website for mobile (iPad, iPhone)
/* if portrait mode is detected, rotate the entire site -90 degrees to hint rotating to landscape */
@media (orientation: portrait) {
body {
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
-o-transform: rotate(-90deg);
-ms-transform: rotate(-90deg);
transform: rotate(-90deg);
}
}
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@millermedeiros
millermedeiros / default.css
Created January 9, 2011 17:55
Default CSS file
/**
* Awesome website
* @author YOUR_NAME_HERE
* @version 0.1
*/
/* ============================ RESET ============================ */
/* ===== Eric Meyer Reset ===== */