Skip to content

Instantly share code, notes, and snippets.

@njmube
njmube / rfc3161.txt
Created September 30, 2022 21:20 — forked from Manouchehri/rfc3161.txt
List of free rfc3161 servers.
http://timestamp.digicert.com
http://timestamp.globalsign.com/tsa/r6advanced1
http://rfc3161timestamp.globalsign.com/advanced
http://timestamp.sectigo.com
http://timestamp.apple.com/ts01
http://tsa.mesign.com
http://time.certum.pl
https://freetsa.org
http://timestamp.globalsign.com/scripts/timstamp.dll
http://timestamp.globalsign.com/?signature=sha2
@njmube
njmube / letsencrypt-guide-nginx-acme.sh.md
Created January 3, 2022 03:47 — forked from dorelljames/letsencrypt-guide-nginx-acme.sh.md
SSL via Let's Encrypt (nginx server)

Nginx SSL via Let's Encrypt and acme.sh

This guide is intended to walk you through installation of a valid SSL on your server for your site at example.com. This example is using root user, you may need to use sudo if you encounter problems such as write permissions.

Pre-requisites

  • Install acme.sh on your server. This will create a acme.sh folder in your home directory and more importantly create an everyday cron job to check and renew certificates if needed.
  • Install nginx server (different per distibution so just make sure you have it up and running)
@njmube
njmube / mui2-custompage-nsd.nsi
Created December 28, 2020 21:41 — forked from johncf/mui2-custompage-nsd.nsi
NSIS Example using MUI2 with a custom page built with NsDialogs.
!include nsDialogs.nsh
!include LogicLib.nsh
!include MUI2.nsh
Name nsDialogs
OutFile nsDialogs.exe
RequestExecutionLevel user
ShowInstDetails show
Var Dialog
default prefix byte = 'S'
default terminator byte = '\n'
0x30 = '0', 0x31 = '1', etc
Hard Reset
command: any of S00\n , S10\n , S20\n , S30\n
response: none
Scanner Enable
enabled by default; only needed after Not-On-File or Scanner Disable
@njmube
njmube / clear_object_with_rtti.pas
Created February 24, 2020 03:19 — forked from martinusso/clear_object_with_rtti.pas
Clear objects with Run-Time Type Information (RTTI) In Delphi
procedure Clear;
var
t: TRttiType;
prop: TRttiProperty;
begin
t := TRttiContext.Create.GetType(Self.ClassType);
for prop in t.GetProperties do
begin
if not prop.IsWritable then Continue;
case prop.PropertyType.TypeKind of
@njmube
njmube / grant.sql
Created February 24, 2020 03:17 — forked from martinusso/grant.sql
grant postgres
GRANT CONNECT ON DATABASE postgres TO role_name;
GRANT CREATE ON DATABASE postgres TO role_name;
GRANT USAGE ON SCHEMA schema_name TO role_name;
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA schema_name TO role_name;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA schema_name TO role_name;
ALTER DEFAULT PRIVILEGES IN SCHEMA schema_name GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO role_name;
@njmube
njmube / domain-to-aws-ec2-instance.md
Created October 31, 2018 20:18 — forked from keithweaver/domain-to-aws-ec2-instance.md
Point Domain to Amazon Web Services (AWS) EC2 Instance

Point Domain to Amazon Web Services (AWS) EC2 Instance

  1. Open the Amazon Route 53 console at https://console.aws.amazon.com/route53/.
  2. If you are new to Amazon Route 53, you see a welcome page; choose Get Started Now for DNS Management. Otherwise, choose Hosted Zones in the navigation pane.
  3. Choose Create Hosted Zone.
  4. For Domain Name, type your domain name.
  5. Choose Create.
  6. Click the Hosted Zone, edit record set.
  7. In the value, add ec2-54-152-134-146.compute-1.amazonaws.com.
  8. Change your DNS file to point to the IPv4 address (This would be in something like GoDaddy).
@njmube
njmube / nginx.conf
Created May 5, 2018 01:35 — forked from mtigas/nginx.conf
Nginx configuration for securedrop.propublica.org. (Based on Ubuntu 13.10 / Nginx 1.4.1 default config.)
# This configuration file is provided on an "as is" basis,
# with no warranties or representations, and any use of it
# is at the user's own risk.
#
# You will need to edit domain name information, IP addresses for
# redirection (at the bottom), SSL certificate and key paths, and
# the "Public-Key-Pins" header. Search for any instance of "TODO".
user www-data;
worker_processes 4;
@njmube
njmube / fastfix
Created April 24, 2018 20:50 — forked from Sharabaddin/fastfix
java.sql.SQLException: The server time zone value 'EEST' is unrecognized or represents more than one time zone
ERROR: java.sql.SQLException: The server time zone value 'EEST' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
SOLVE:
1. sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
2. add after line [mysqld]
default_time_zone='+03:00'
3. ctrl+o
4. ctrl+x
5. sudo service mysql restart