Skip to content

Instantly share code, notes, and snippets.

View ijat's full-sized avatar
🏠
Working from home

Ijat ijat

🏠
Working from home
View GitHub Profile
@ijat
ijat / conf.xml
Created January 23, 2021 08:29 — forked from Anime4000/conf.xml
Maxis TP-Link Archer C5v
<?xml version="1.0"?>
<DslCpeConfig>
<InternetGatewayDevice>
<DeviceSummary val="InternetGatewayDevice:1.1[](Baseline:1, EthernetLAN:1)" />
<LANDeviceNumberOfEntries val=2 />
<WANDeviceNumberOfEntries val=3 />
<DeviceInfo>
<ManufacturerOUI val=F8D111 />
<SerialNumber val=0000000000000 />
<HardwareVersion val="Archer C5v v1 00000000" />
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@ijat
ijat / ca.md
Created March 27, 2019 08:43 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@ijat
ijat / udp_checksum.c
Created September 25, 2018 06:08 — forked from GreenRecycleBin/udp_checksum.c
UDP checksum
uint16_t udp_checksum(struct udphdr *p_udp_header, size_t len, uint32_t src_addr, uint32_t dest_addr)
{
const uint16_t *buf = (const uint16_t*)p_udp_header;
uint16_t *ip_src = (void*)&src_addr, *ip_dst = (void*)&dest_addr;
uint32_t sum;
size_t length = len;
// Calculate the sum
sum = 0;
while (len > 1)
@ijat
ijat / ethcom.c
Created September 24, 2018 02:58 — forked from lethean/ethcom.c
Send / Receive raw Ethernet frames with custom EtherType in Linux
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
vim: set autoindent expandtab shiftwidth=2 softtabstop=2 tabstop=2: */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <getopt.h>
#include <sys/types.h>
#include <sys/socket.h>
@ijat
ijat / sendRawEth.c
Created September 21, 2018 09:23 — forked from austinmarton/sendRawEth.c
Send a raw Ethernet frame in Linux
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <stdio.h>
@ijat
ijat / RiderLike.xml
Last active May 17, 2018 16:47 — forked from TravelingMan/RiderLike.xml
Codinion theme similar to Jetbrains Rider 2017.1
<?xml version="1.0" encoding="utf-8"?>
<Theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ThemeColorType>Dark</ThemeColorType>
<Formats>
<Entry Key="CodinionCSharpNamespaceClassifier">
<Format IsEnabled="true">
<ClassifierName>CodinionCSharpNamespaceClassifier</ClassifierName>
<Color>#FFADD8E6</Color>
<Decorations />
</Format>
@ijat
ijat / README.md
Created January 11, 2018 02:53 — forked from joar/README.md
Accessing MSI Afterburner remote server manually

Where $ip and $port are your MSI Afterburner Remote Server's IP address and port:

  • Go to $ip:$port/mahm, you will be presented with a HTTP Basic Auth dialog.
  • Enter MSIAfterburner as the username.
  • Enter your security key as the password.

Profit! You'll get an XML file that looks something like the attached xml-example.xml.

@ijat
ijat / letsencrypt_2017.md
Created January 1, 2018 14:56 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two main modes to run the Let's Encrypt client (called Certbot):

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80).

In the following, we're setting up mydomain.com. HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.