Skip to content

Instantly share code, notes, and snippets.

View markterence's full-sized avatar
🎯
Focusing

Mark Terence Tiglao markterence

🎯
Focusing
  • Earth, Asia/Manila
  • 18:44 (UTC +08:00)
View GitHub Profile
@gdamjan
gdamjan / README.md
Last active July 9, 2024 22:54
Setup for an easy to use, simple reverse http tunnels with nginx and ssh. It's that simple there's no authentication at all. The end result, a single ssh command invocation gives you a public url for your web app hosted on your laptop.

What

A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.

Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).

Requirements

@jareware
jareware / SCSS.md
Last active July 1, 2024 09:25
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@facultymatt
facultymatt / roles_invesitgation.md
Last active April 16, 2024 09:31
Roles and permissions system for Nodejs
@CiprianSpiridon
CiprianSpiridon / Laravel-Blade-Template-Cheatsheet
Last active June 11, 2024 08:30
Laravel Blade Template Cheatsheet
{{ $var }} - Echo content
{{ $var or 'default' }} - Echo content with a default value
{{{ $var }}} - Echo escaped content
{{-- Comment --}} - A Blade comment
@extends('layout') - Extends a template with a layout
@if(condition) - Starts an if block
@else - Starts an else block
@elseif(condition) - Start a elseif block
@endif - Ends a if block
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@lukehedger
lukehedger / ffmpeg-compress-mp4
Last active July 12, 2024 14:34
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@wenzhixin
wenzhixin / ubuntu14.04-command-line-install-android-sdk
Last active July 4, 2024 05:29
Ubuntu 14.04 command line install android sdk
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
# install all sdk packages
@uupaa
uupaa / nginx.conf
Last active February 28, 2023 09:29
nginx: Avoid CORS and reverse proxy settings
http {
server {
listen 8080;
server_name localhost;
charset UTF-8;
# Avoid CORS and reverse proxy settings
# [1] xhr request: http://localhost:8080/api/xxx/yyy/zzz
# [2] /api/xxx/yyy/zzz
# [3] http://your-dev-server.example.com/api/xxx/yyy/zzz
@bitoiu
bitoiu / self-signed-wildcard-cert-for-ghes.md
Last active September 19, 2023 09:37
Self-Signed Wildcard certificate with SAN using openssl / SSL

Copy the default template of openssl.cnf to a writable location.

cp /System/Library/OpenSSL/openssl.cnf src

Uncomment the req_extensions = v3_req

req_extensions = v3_req # The extensions to add to a certificate request

Add subjectAltName to v3_req section

@j-mcnally
j-mcnally / upgrade_container.sh
Last active June 15, 2018 10:51
Container Reload Script
#!/bin/bash
docker pull user/myrepo && \
docker rm -f myapp && \
docker run -d -p 80:80 -e RAILS_ENV=production --env-file=/opt/utils/deps/web.envfile --name=myapp --link=postgres:postgres --link=redis:redis user/myrepo