Skip to content

Instantly share code, notes, and snippets.

Avatar

Satadru Pramanik satmandu

View GitHub Profile
@satmandu
satmandu / gist:5042446
Created Feb 26, 2013
'brew install -v python --with-brewed-openssl' on OS X 10.8.2
View gist:5042446
server: satadru$ brew install -v python --with-brewed-openssl
==> Downloading http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
Already downloaded: /Library/Caches/Homebrew/python-2.7.3.tar.bz2
/usr/bin/tar xf /Library/Caches/Homebrew/python-2.7.3.tar.bz2
==> Downloading patches
/usr/bin/curl -f#LA Homebrew 0.9.4 (Ruby 1.8.7-358; Mac OS X 10.8.2) https://gist.github.com/raw/4349132/25662c6b382315b5db67bf949773d76471bbcee7/python-nfs-shutil.diff -o 000-homebrew.diff
######################################################################## 100.0%
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
View gist:5438808
tynt.com
intellitxt.com
vibrantmedia.com
snap.com
intellitxt.com
snap.com
kontera.com
AdGardener.com
apture.com
wibiya.com
@satmandu
satmandu / voiceplus.patch
Created Sep 11, 2013
VoicePlus Patch to eliminate multipart text concatenation prior to sending to Google Voice
View voiceplus.patch
--- android_packages_apps_VoicePlus/cm-10.2/src/org/cyanogenmod/voiceplus/VoicePlusService.java 2013-09-11 11:44:42.000000000 -0400
+++ android_packages_apps_VoicePlus/cm-10.2/src/org/cyanogenmod/voiceplus/VoicePlusService.java.new 2013-09-11 11:45:50.000000000 -0400
@@ -297,12 +297,6 @@
return;
}
- // combine the multipart text into one string
- StringBuilder textBuilder = new StringBuilder();
- for (String text: texts) {
- textBuilder.append(text);
@satmandu
satmandu / mavericks make iso v1
Last active Mar 24, 2020
Quick and Dirty make OS X Mavericks ISO on desktop. Note that you're going to have to enter your password for the sudo commands.
View mavericks make iso v1
hdiutil attach /Applications/Install\ OS\ X\ Mavericks.app/Contents/SharedSupport/InstallESD.dmg
cd /tmp
hdiutil convert /Volumes/OS\ X\ Install\ ESD/BaseSystem.dmg -format UDRW -o /tmp/RWBase
hdiutil convert -format UDSP -o /tmp/sparseRWBase RWBase.dmg
rm /tmp/RWBase.dmg
hdiutil resize -size 6g /tmp/sparseRWBase.sparseimage
hdiutil attach -owners on /tmp/sparseRWBase.sparseimage -shadow
sudo rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages
sudo ditto /Volumes/OS\ X\ Install\ ESD/Packages /Volumes/OS\ X\ Base\ System/System/Installation/Packages
hdiutil eject /Volumes/OS\ X\ Install\ ESD/
View keybase.md

Keybase proof

I hereby claim:

  • I am satmandu on github.
  • I am satadru (https://keybase.io/satadru) on keybase.
  • I have a public key ASASlTfjTHvXY5GikRIg-lHdX-mNO3Xabn6EN7ESB6egggo

To claim this, I am signing this object:

@satmandu
satmandu / MacBookPro6,2-integrated-graphics-only.md
Created May 10, 2017
Getting a MacBookPro6,2 working with integrated graphics only with ubuntu.
View MacBookPro6,2-integrated-graphics-only.md
@satmandu
satmandu / netflix-dns.sh
Last active Jan 10, 2021
PfSense script to keep HE tunnels from confusing netflix by blocking netflix IPV6 resolution.
View netflix-dns.sh
#!/bin/sh
#make sure the directory for the python libraries is in the chroot
mkdir -p /var/unbound/usr/local/lib/python2.7
#link the actual python library directory to the chroot's directory
mount -t nullfs /usr/local/lib/python2.7 /var/unbound/usr/local/lib/python2.7
#copy the python script to the /var/unbound directory so
#unbound-checkconf can find it
View gist:8a19a4ffb60a96d14716defc535ae8bf
sudo apt update
sudo apt-get install -y bc build-essential gcc-aarch64-linux-gnu git unzip subversion
mkdir rpi ; cd rpi
# to get head, aka most actively developed current rpi kernel tree
git clone --depth=1 https://github.com/raspberrypi/linux.git
# for specific version use: git clone --depth=1 -b rpi-4.14.y https://github.com/raspberrypi/linux.git
# Now we get updated rpi firmware
svn export https://github.com/raspberrypi/firmware/trunk/boot
rm boot/config.txt
rm boot/kernel*
View ocr
#!/bin/bash
if [ "$1" != "" ]; then
nice -20 ocrmypdf --redo-ocr --pdfa-image-compression lossless --output-type pdfa-2 "$1" "$1"
else
echo "No filename given"
fi
@satmandu
satmandu / gist:3fd42c5a538bc34a1636950740838d3e
Created Apr 12, 2019
Waveshare35a config info for raspberry pi
View gist:3fd42c5a538bc34a1636950740838d3e
From https://www.spotpear.com/learn/EN/raspberry-pi/Raspberry-Pi-LCD/Raspberry-Pi-_Rotate-the-screen-display.html
Raspberry Pi - Rotate the screen display
Raspberry Pi 2.4/3.2 inch LCD
Rotate display
sudo nano /boot/config.txt