Skip to content

Instantly share code, notes, and snippets.

View tlongren's full-sized avatar
🎯
Focusing

Tyler Longren tlongren

🎯
Focusing
View GitHub Profile
@simonesestito
simonesestito / README.md
Last active February 28, 2024 15:54
Server setup script

Server initial setup script

Configuration

This script was made for personal purposes, but it can still be useful to many. You NEED to change variables inside the script, like the SSH public key.

Usage

On a new Ubuntu server, run the following command:

@schappim
schappim / just_f-ing_ping.md
Last active February 17, 2024 06:15
Just F-ing Ping - Because sometimes you just want to f-ing ping!

Just F-ing Ping

Because sometimes you just want to f-ing ping!

Modern browsers, believing they are being clever, hide the protocol in the URL bar.

image

However, even if you only select the hostname, when you paste that URL into your terminal, you will encounter the following:

image

@brasey
brasey / Configure systemd-resolved to use a specific DNS nameserver for a given domain.md
Created October 25, 2019 14:38
Configure systemd-resolved to use a specific DNS nameserver for a given domain

Configure systemd-resolved to use a specific DNS nameserver for a given domain

Use case

Given

  • I use a VPN to connect to my work network
  • I'm on a Linux computer that uses systemd-resolved
  • I have a work domain called example.com
  • example.com is hosted by both public and private DNS nameservers

So yesterday brought the sad news that Google Reader is being killed off. C’est la vie it seems, given it was a Google product. In my search for an alternative I rediscovered Fever and decided to see if I could run it up for free on Heroku. Onwards...

Personally I think the news about Reeder is quite sad, as I would quite happily have paid for it as a service. In fact I like RSS so much that I actually shelled out the $30 for Fever when it first came out years ago (I was also pretty massive Shaun Inman fanboy if I’m being honest).

I ended up setting Fever aside because screw having to manage self-hosting for PHP and MySQL, right?

If you’re new to Fever I recommend going and checking it out, but also reading the post in response to the Google Reader announcement by Fevers author, Shaun, for a good list of what Fever is and isn’t.

Enough jibba-jabba!

@aviaryan
aviaryan / zsh-on-windows.md
Last active February 9, 2024 03:22
Installing zsh and oh-my-zsh on Windows
  1. Install zsh from cygwin
  2. Install oh-my-zsh from https://github.com/robbyrussell/oh-my-zsh . Follow the manual instructions
  3. To make zsh default on ConEmu, create a task with C:\cygwin64\bin\mintty.exe /usr/bin/zsh - . Make it the defaut shell.
  4. To start a zsh shell on demand, add this batch script to your path or start menu or wherever.
start C:\cygwin64\bin\mintty.exe /usr/bin/zsh -
@benhowdle89
benhowdle89 / gist:7584827
Last active February 7, 2024 11:30
A todo app you can run from the browser's address bar. No persistence (boo localstorage security risk). Made by @benhowdle.
data:text/html,<div class="wrap"> <h1>Todo<span>, no fuss lists</span></h1> <input placeholder="Add a todo" type="text" id="item" /> <button id="go">Save</button> <span class="help">* tap to delete</span> <ul id="tudu_list"> </ul> </div><script type="text/javascript">var tudu_list = document.getElementById('tudu_list'); var item = document.getElementById('item'); var new_li; var new_obj = {}; function prependElement(parentID,child) { parent=parentID; parent.insertBefore(child,parent.childNodes[0]); } function remove(element){ element.parentNode.removeChild(element); } function deleteItem(){ var answer = confirm('Sure you want to remove this?'); if(answer){ var deleteId = this.getAttribute('rel'); remove(this); } } function addItem(){ if(item.value !== ''){ new_li = document.createElement('li'); new_li.innerHTML = item.value; prependElement(tudu_list, new_li); new_li.onclick = deleteItem; item.value = ''; } } function callAdd(e){ if(event.keyCode == 13){ addItem(); } } item.onkeyup = function(e){ callAdd(e) };
@dweldon
dweldon / meteor-nginx
Last active January 22, 2024 06:53
This is an example of how to configure nginx to serve a meteor app.
server {
listen [::]:80;
listen 80;
server_name app.example.com;
return 301 https://$server_name$request_uri;
}
server {

Recon and Attack Vectors from My Logs

This document contains excerpts from my web server logs collected over a period of 7 years that shows various kinds of recon and attack vectors.

There were a total of 37.2 million lines of logs out of which 1.1 million unique HTTP requests (Method + URI) were found.

$ sed 's/^.* - - \[.*\] "\(.*\) HTTP\/.*" .*/\1/' access.log &gt; requests.txt
@EmranAhmed
EmranAhmed / 1. main.css
Last active January 11, 2024 01:29
CSS Responsive breakpoint, Media Query break point
/*==================================================
= Bootstrap 3 Media Queries =
==================================================*/
/*========== Mobile First Method ==========*/
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
@ThEMarD
ThEMarD / flash-all.sh
Created January 13, 2021 09:08
flash all script for payton pie
#!/bin/sh
# Copyright 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#