Skip to content

Instantly share code, notes, and snippets.

@fhdalikhan
fhdalikhan / Dockerfile
Last active April 28, 2024 19:06
Dockerfile for PHP 7.4 FPM Alpine
FROM php:7.4-fpm-alpine
WORKDIR /var/www/html
# Setup GD extension
RUN apk add --no-cache \
freetype \
libjpeg-turbo \
libpng \
freetype-dev \
@heygambo
heygambo / lwp-cloudflare-dyndns.sh
Created March 17, 2020 05:21
Cloudflare as Dynamic DNS (revised)
#!/bin/bash
# Cloudflare as Dynamic DNS
# From: https://letswp.io/cloudflare-as-dynamic-dns-raspberry-pi/
# Based on: https://gist.github.com/benkulbertis/fff10759c2391b6618dd/
# Original non-RPi article: https://phillymesh.net/2016/02/23/setting-up-dynamic-dns-for-your-registered-domain-through-cloudflare/
# Fixed and documented version by Christian Gambardella (https://gambo.io)
# 1. Create a cloudflare account
# 2. Create a zone and a record with any ip address.
# It will be updated by the script.
@bouroo
bouroo / thai-id-card.js
Last active January 25, 2024 04:20
Thai National ID Card reader in NodeJS
/* eslint-disable no-console */
/*
* Thai National ID Card reader in NodeJS
*
* Linux
* apt install libpcsclite-dev libpcsclite1 pcscd build-essential
*
* Windows
* yarn global add windows-build-tools
*
@Firsh
Firsh / lwp-cloudflare-dyndns.sh
Last active January 6, 2024 15:38
Cloudflare as Dynamic DNS
#!/bin/bash
# Cloudflare as Dynamic DNS
# From: https://letswp.io/cloudflare-as-dynamic-dns-raspberry-pi/
# Based on: https://gist.github.com/benkulbertis/fff10759c2391b6618dd/
# Original non-RPi article: https://phillymesh.net/2016/02/23/setting-up-dynamic-dns-for-your-registered-domain-through-cloudflare/
# Update these with real values
auth_email="email@example.com"
auth_key="global_api_key_goes_here"
zone_name="example.com"
@egyjs
egyjs / Direct Link of YouTube videos.md
Last active April 17, 2024 06:38
PHP API To get Direct Link of YouTube videos
@unsalted
unsalted / sierra-hackintosh-z170-a.md
Last active June 4, 2021 14:03
Sierra 10.12.3 Hackintosh | Asus z170-A, Intel i5 6500, MSI GTX 960 OC, GTX1070(Dormant)

Sierra 10.12.3 Hackintosh

This is my build documentation for an ASUS Z170-A setup with an NVIDIA GTX960 and the Intel i5 6500, most of this came from Storks asus rog maximus build, his audio instructions didn't work for me so it differs substantially there. This build also doesn't have NVRAM. Nearest I can tell everything is running as expected, including all USB and audio ports.

Build

  • Asus Z170-A
  • Intel Core i5-6500
  • Crucial Ballistix Sport LT 32GB (2 x 16GB) DDR4-2400 Memory
  • MSI GeForce GTX 960 4GB Installed in slot 1!
@shaps80
shaps80 / cURL+Request.swift
Last active December 23, 2023 17:43
Generates a cURL command representation of a URLRequest in Swift.
import Foundation
extension URLRequest {
/**
Returns a cURL command representation of this URL request.
*/
public var curlString: String {
guard let url = url else { return "" }
var baseCommand = #"curl "\#(url.absoluteString)""#
@zenorocha
zenorocha / basic.md
Last active March 26, 2023 09:00
New Firebase Auth vs Old Firebase Auth
@djonsson
djonsson / install_elasticsearch_osx.md
Last active November 11, 2022 21:10
OS X installation instructions for Elasticsearch + Kibana + Marvel

What is this?

Following this guide will set up a local Elasticsearch with Kibana and Marvel using Homebrew and Homebrew Cask

Prerequisites

If you already have Java installed on your system, skip steps Install Cask and Install Java

If you already have Java and Homebrew installed on your system, skip steps Prerequisites, start at Install Elasticsearch and Kibana after running $ brew update

Install Homebrew

  • $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@leotm
leotm / ovpnAuth.js
Last active July 25, 2018 16:53
Node.js - Add authentication to OpenVPN (.ovpn) files
var fs = require("fs");
var glob = require("glob");
glob('*.ovpn', function (err, files) {
if (err) { throw err; }
files.forEach(function(item,index,array){
// Each .ovpn file will use login.conf containing un and pw
fs.appendFile(item, ' auth-user-pass login.conf', function (err) {});
});
});