Skip to content

Instantly share code, notes, and snippets.

View theshapguy's full-sized avatar

Shap Guy theshapguy

View GitHub Profile
@theshapguy
theshapguy / nokia-router-cfg-tool.py
Created November 30, 2022 12:20 — forked from thedroidgeek/nokia-router-cfg-tool.py
Nokia/Alcatel-Lucent router backup configuration tool
#!/usr/bin/env python3
#
# Nokia/Alcatel-Lucent router backup configuration tool
#
# Features:
# - Unpack/repack .cfg files generated from the backup and restore functionnality
# in order to modify the full router configuration
# - Decrypt/encrypt the passwords/secret values present in the configuration
@theshapguy
theshapguy / Input-Font.zip
Last active August 4, 2021 02:58
Install Font Input - Fontbureau Shutdown
@theshapguy
theshapguy / Paprika
Last active June 9, 2021 08:09
Paprika
Paprika Dataset Zip
@theshapguy
theshapguy / ghj
Created September 10, 2020 03:44
ghj
{
"id": 126103,
"date": "2020-09-06T08:18:22.000+0000",
"formattedDate": "Sep 06, 2020 - 14:03 PM",
"processDate": "2020-09-06T08:18:22.000+0000",
"formattedProcessDate": "Sep 06, 2020 - 14:03 PM",
"amount": -10.000000,
"formattedAmount": "-10.00 NPR",
"transferType": {
"id": 41,
@theshapguy
theshapguy / timezone.html
Last active April 13, 2019 20:53
Timezone Dropdown HTML Select (tz database - olson)
<select name="timezone" class="settings-input" id="accounts-team-timezone">
<!-- Popular Timezones </option> -->
<option value="America/Los_Angeles">(GMT-08:00) Pacific Time (US & Canada)</option>
<option value="US/Mountain">(GMT-07:00) Mountain Time (US & Canada)</option>
<option value="US/Central">(GMT-06:00) Central Time (US & Canada)</option>
<option value="US/Eastern">(GMT-05:00) Eastern Time (US & Canada)</option>
<option value="Europe/London">(GMT+00:00) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London</option>
<option value="Africa/Nairobi">(GMT+03:00) Nairobi</option>
<option value="Asia/Kolkata">(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi</option>
@theshapguy
theshapguy / hooks.go
Last active October 11, 2019 16:54
Travis CI Webhooks Signature Verification
package main
/*
Copyright 2017 Shapath Neupane (@theshapguy)
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
@theshapguy
theshapguy / gist:7944c086731b06be6ce00bec0068c730
Created October 17, 2016 18:13
Developer Settings Control
Last login: Mon Oct 17 11:48:45 on ttys001
adb shell am start -n com.android.settings/.DevelopmentSettings
shapath@neupane:
[~]: adb shell am start -n com.android.settings/.DevelopmentSettings
Starting: Intent { cmp=com.android.settings/.DevelopmentSettings }
shapath@neupane:
[~]: adb shell am force-stop io.shap.saturn.debug; adb shell setprop debug.hwui.overdraw show
shapath@neupane:
[~]: adb shell am force-stop io.shap.saturn.debug; adb shell setprop debug.hwui.overdraw false
@theshapguy
theshapguy / FontUtil.kt
Created December 13, 2015 15:42
Font Cache in Kotlin
object FontUtil {
private val sTypefaceCache = HashMap<String, Typeface>()
fun getOTF(context: Context, font: String): Typeface {
if (!sTypefaceCache.containsKey(font)) {
val tf = Typeface.createFromAsset(
context.applicationContext.assets, "fonts/%s.otf".format(font))
sTypefaceCache.put(font, tf)
}