Skip to content

Instantly share code, notes, and snippets.

View aknik's full-sized avatar
🐰
Hola

Aknik aknik

🐰
Hola
View GitHub Profile
@aknik
aknik / gold-silver-rates.php
Created August 17, 2018 19:42 — forked from surferxo3/gold_silver_rates.php
Gold and Silver Rates API to fetch updated rates with their respective currency and price.
<?php
/*#############################
* Developer: Mohammad Sharaf Ali
* Designation: Web Developer
* Version: 1.0
*/#############################
const RATES_API_URL = 'http://goldprice.org/NewCharts/gold/images/goldsilverpricesforcalculators.txt';
@aknik
aknik / servidor.py
Created June 26, 2018 18:15 — forked from jgrocha/servidor.py
Moon phases based on pyephem
#-*- coding: utf-8 -*-
from BaseHTTPServer import BaseHTTPRequestHandler
import urlparse
import ephem, datetime
import json
# Phases of the Moon, using the datetime.now() at UTC
# http://127.0.0.1:8899/
# Phases of the Moon, using the datetime.datetime(int(year), int(month), int(day))) at UTC
@aknik
aknik / servidor.py
Created June 26, 2018 18:15 — forked from jgrocha/servidor.py
Moon phases based on pyephem
#-*- coding: utf-8 -*-
from BaseHTTPServer import BaseHTTPRequestHandler
import urlparse
import ephem, datetime
import json
# Phases of the Moon, using the datetime.now() at UTC
# http://127.0.0.1:8899/
# Phases of the Moon, using the datetime.datetime(int(year), int(month), int(day))) at UTC
@aknik
aknik / self-signed-certificate-with-custom-ca.md
Created June 7, 2018 18:36 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@aknik
aknik / gist:f6af1cd20d3d65627d79ad5c7e674ae4
Created April 30, 2018 16:55 — forked from pwlin/gist:8a0d01e6428b7a96e2eb
Android : add cert to system store
https://code.google.com/p/android/issues/detail?id=32696#c5
If you have a certificate that is not
trusted by Android, when you add it, it goes in the personal cert store.
When you add a cert in this personal cert store, the system requires a
higher security level to unlock the device. But if you manage to add your
cert to the system store then you don't have this requirement. Obviously,
root is required to add a certificate to the system store, but it is quiet
easy.
@aknik
aknik / Code.gs
Created April 24, 2018 16:14 — forked from oldwestaction/Code.gs
google apps script to populate a google sheet w/ fragrance notes from fragrantica
function onOpen() {
var ui = SpreadsheetApp.getUi();
ui.createMenu('Custom functions')
.addItem('Look up fragrance notes', 'getFragranceNotes')
.addToUi();
}
function getFragranceNotes() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var allSheets = ss.getSheets();
@aknik
aknik / README.md
Created April 21, 2018 15:47 — forked from chrislkeller/README.md
SpreadSheet To Fusion Tables

Script to sync a Google SpreadSheet to a Fusion Table

Save for a few legacy projects that still use Fusion Tables I don't actively use this script anymore. This update hopefully solves the OAuth issue that cropped up once Google depcricated the Client Login method used by the prior version.

As always, your mileage may vary, and I welcome someone -- Google or otherwise -- to offer a long-term maintained solution.

The following is largely cribbed from a Google example here. I try to explain some of the API settings that must be enabled in the Developer's Console and elsewhere

Create your spr

@aknik
aknik / fakebeacon.py
Created April 9, 2018 15:55 — forked from tintinweb/fakebeacon.py
scapy-fakebeacon - spawn lots of fake wifi access points by injecting beacon frames with scapy (essid)
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# source: https://www.4armed.com/blog/forging-wifi-beacon-frames-using-scapy/
#
# requires:
# radiotap supported wifi nic/driver (frame injection) (works fine with Ralink RT2571W)
# iwconfig $iface mode monitor
# iw dev $iface set channel $channel
# or
@aknik
aknik / ESP32_raw_packet.ino
Created March 23, 2018 13:22 — forked from mic159/ESP32_raw_packet.ino
ESP32 raw packets
#include <WiFi.h>
#include "wifi_headers.h"
#include <esp_wifi.h>
//#include <esp_wifi_internal.h>
#include <lwip/err.h>
typedef union {
uint8_t fix_rate;
uint8_t b5;
uint8_t b4;
@aknik
aknik / esp32_promisc.c
Created March 8, 2018 19:48 — forked from brainstorm/esp32_promisc.c
esp32 promiscuous mode and packet injection experiments
// Espressif ESP32 promiscuous mode and packet injection experiments
// by brainstorm at nopcode org
#include "freertos/FreeRTOS.h"
#include "esp_wifi.h"
#include "esp_wifi_internal.h"
#include "lwip/err.h"
#include "esp_system.h"
#include "esp_event.h"
#include "esp_event_loop.h"