Skip to content

Instantly share code, notes, and snippets.

View agamm's full-sized avatar
🍪
Cookie: cookies=∞;\r\n

Agam More agamm

🍪
Cookie: cookies=∞;\r\n
View GitHub Profile
@agamm
agamm / index.android.js
Created May 10, 2016 15:12
React native basic navigation
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
import React, { Component } from 'react'
import { AppRegistry, StyleSheet, Text, View, Navigator, ToolbarAndroid, TouchableHighlight } from 'react-native'
class reactgame extends Component {
render () {
@agamm
agamm / Change Netflix playback speed (browser).md
Last active October 13, 2022 22:05
Speed up your netflix binge watching without any needless extensions.

Open the console (Cmd + Option + J / ctrl+shift+j)
$('video').playbackRate = 1.2 - will speed by 20%

unzip.dev🚀

@agamm
agamm / showAllResolved.md
Last active February 26, 2024 08:56
Show all resolved comments in a Github Pull Request

Run this in the console:

document.querySelectorAll('span.Details-content--closed').forEach((e)=>{e.click()})

From the creator of: unzip.dev 🚀

@agamm
agamm / convert.py
Last active October 13, 2022 22:25
Python money/currency format and convert string to integer.
from re import sub, search
from decimal import Decimal
# Not production ready
def convert(m):
r = 1.0
if "£" in m:
r = 1.28 # Make sure to check this (conversion rate between pounds and usd)
z = 0
@agamm
agamm / mbox-extract-attachments3.py
Last active October 13, 2022 22:24 — forked from kellerza/mbox-extract-attachments3.py
mbox-extract-attachments3.py with fix to support iso-8859-8-i encoding.
#!/usr/bin/env python3
# pylint: disable=invalid-name
"""mbox-extract-attachments3 - Extract attachments from mbox files.
Good companion for Google Takeout https://takeout.google.com/settings/takeout
Modified by http://github.com/kellerza from
https://github.com/PabloCastellano/pablog-scripts/
- Python3 & linter errors
- New Filenames
@agamm
agamm / color-range-slider.markdown
Last active October 13, 2022 22:21
Color range slider with animated emoji.

Color range slider

As the slider handle is dragged, it's background color matches that of the gradient track below.

Uses jQueryUI slider.

A Pen by Agam on CodePen.

License.

If you have many files of go test runs concat like so: cat <path>/* > concat_tests.raw

Call: python t.py concat_tests.raw

@agamm
agamm / link.tsx
Last active October 13, 2022 22:18
Nextjs Link component with a redirection delay.
@agamm
agamm / crypto.js
Last active October 13, 2022 22:02
Simple encryption decryption with client-size JS (cryptoJS)
// Don't follow this link: unzip.dev (unless you're curious).
const secret = prompt("Enter secret:")
const message = prompt("Enter message:")
const encrypted = CryptoJS.AES.encrypt(message, secret);
const decrypted = CryptoJS.AES.decrypt(encrypted, secret);
console.log(encrypted.toString())
console.log(decrypted.toString(CryptoJS.enc.Utf8))
@agamm
agamm / reset-internet.ps1
Last active October 13, 2022 22:01
Reset internet when down on Windows via powershell
// unzip.dev ?
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit }
# Thanks: https://den.dev/blog/powershell-windows-notification/
function Show-Notification {
[cmdletbinding()]
Param (
[string]