Skip to content

Instantly share code, notes, and snippets.

View deadmann's full-sized avatar

Hassan Faghihi deadmann

View GitHub Profile
@deadmann
deadmann / Bind9-DNSSEC-Chat.md
Created September 21, 2023 20:56
Bind9 DNSSEC - Creating key, so allowing better integration between Microsoft DNS Server 2016 as Primary and Bind9 as Secondary

If you have DNSSEC enabled and configured on your primary DNS server, it's a good practice to also configure DNSSEC on your secondary DNS server. DNSSEC helps to ensure the authenticity and integrity of DNS data, and having it enabled on both servers is a security best practice.

To configure DNSSEC on your secondary DNS server, you'll need to perform the following steps:

Install DNSSEC Tools (if not already installed): Ensure that DNSSEC tools are installed on your secondary DNS server. The specific package names might vary depending on your Linux distribution, but commonly used tools are part of the "dnssec-tools" package. You can typically install it using your package manager. For example, on Ubuntu:

sudo apt-get install dnssec-tools

Generate DNSSEC Keys (if not already generated): You'll need to generate DNSSEC keys for each signed zone. Use the "dnssec-keygen" command to generate the keys. For example:

@deadmann
deadmann / gist:42b420d20867ed9a822c499fd0f8f5ff
Created July 3, 2021 13:55
Serialize and Flatting object data into string
const findObjectDataRecursive = function (obj, subKey='') {
let dataArray = [];
if (typeof (obj) === "undefined" || obj === null)
return undefined;
if (typeof obj === "object"){
let result = [];
if (Array.isArray(obj)){
for(let i = 0; i < obj.length; i++) {
let x = findObjectDataRecursive(obj[i], subKey + '['+i+']');
@deadmann
deadmann / ImageHelper.cs
Created May 30, 2021 07:17
Image Helper - Resize, file and set watermark
using System;
using System.Drawing;
using System.Drawing.Imaging; // .Net Core Fix: Image and ImageFormat are missing and it requires to install `System.Drawing.Coomon` package
using System.IO;
namespace Hassan.Helpers
{
internal class ImageHelper
{
internal static void SaveImageToFile(Image img, string staticFileName)
@deadmann
deadmann / google-recaptcha-bypass.txt
Created September 26, 2020 11:40 — forked from harddy/google-recaptcha-bypass.txt
Bypass Google Recaptcha for development purposes
With the following test keys, you will always get No CAPTCHA and all verification requests will pass.
Site key: 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
Secret key: 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
@deadmann
deadmann / BookDependencies.cs
Created May 11, 2016 06:52
Question About Classes Related To SamTech Hotelux API
public class AddressInfo
{
public string CityId { get; set; }
public string Country { get; set; }
public string CountryCode { get; set; }
public string PostalCode { get; set; }
public string StateProvinceCode { get; set; }
public string Address { get; set; }
public string City { get; set; }
}
@deadmann
deadmann / resource.js
Last active April 4, 2016 06:09 — forked from vladikoff/resource.js
Angular $resource and transformResponse
angular.module('itemServices', ['ngResource'])
.factory('Item', ['$resource',
function ($resource) {
return $resource('items/:id',
{id: '@id'},
{
query: {
isArray: true,
method: 'GET',
params: {},
using System;
using NHibernate;
using NHibernate.Cfg;
namespace HassanFaghihi.StatesInstitution.BusinessTier.Util.Hibernate
{
public class HibernateUtil
{
private HibernateUtil(){}