Skip to content

Instantly share code, notes, and snippets.

@bre7
bre7 / f680.md
Created October 14, 2024 16:35 — forked from olmedocr/f680.md
Instrucciones para obtener las claves GPON, SIP y de administración del router f680 v2 y v4 con firmware T18

Pre requisitos: USB formateado en NTFS Live CD de alguna distro de linux (probe con macOS, pero no parece funcionar) f680 v2 o v4 con version de firmware T18 o anterior (no se si funcionará con futuras versiones)

Al lio: Formateamos el USB en NTFS y desde linux creamos un symlink con el siguiente comando: ln -s /var/samba/lib/smb.conf .

Lo enchufamos al USB del router y nos metemos en la interfaz web, en el apartado de aplicaciones nos aseguramos de que el servidor samba este activado y funcionando, ahi mismo encontraremos las instrucciones para conectarnos

@bre7
bre7 / ios.md
Created April 10, 2022 19:01
Running Xcode 13.2.1 on iPhone iOS 15.3+

Credits to https://developer.apple.com/forums/thread/702220

  1. Download latest ZIP from https://github.com/iGhibli/iOS-DeviceSupport/tree/master/DeviceSupport
  2. Paste ZIP file contents to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport

E.g.

mkdir -p ./ios-dd/ && wget -qO- https://github.com/iGhibli/iOS-DeviceSupport/raw/master/DeviceSupport/15.4(FromXcode_13.3(13E113)).zip | bsdtar -xvf- -C ./ios-dd/ && mv ./ios-dd/* /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/ && rm -rf ./ios-dd
@bre7
bre7 / RemoveDupfromPATH.ps1
Created January 26, 2022 20:58 — forked from gitsoup/RemoveDupfromPATH.ps1
Windows Powershell to remove duplicate PATH variables
#---------------------------------------------------------------------------------
#The sample scripts are not supported under any Microsoft standard support
#program or service. The sample scripts are provided AS IS without warranty
#of any kind. Microsoft further disclaims all implied warranties including,
#without limitation, any implied warranties of merchantability or of fitness for
#a particular purpose. The entire risk arising out of the use or performance of
#the sample scripts and documentation remains with you. In no event shall
#Microsoft, its authors, or anyone else involved in the creation, production, or
#delivery of the scripts be liable for any damages whatsoever (including,
#without limitation, damages for loss of business profits, business interruption,
@bre7
bre7 / watermark_with_image.rb
Created June 16, 2021 17:33 — forked from adityashedge/watermark_with_image.rb
Watermark images with ImageMagick 'convert' using 'composite', 'watermark' and 'dissolve' in Ruby
# Watermarking image with another image using Imagemagick 'composite', 'watermark' and 'dissolve'.
require "RMagick"
# Read the image in the memory with RMagick
img = Magick::Image.read("/home/aditya/Pictures/old_england_pic.jpg").first
# the original image was in jpg format
# need to make the white background color transparent
# also changed the format to png since JPG does not support transparency.
# run the command below to create an image with transparent background using ImageMagick
@bre7
bre7 / Apps Script pdfToText utility.md
Created June 13, 2021 13:59 — forked from mogsdad/Apps Script pdfToText utility.md
For http://stackoverflow.com/questions/26613809, a question about getting pdf attachments in gmail as text. I got a little carried away - this does much more than asked.

Google Apps Script pdfToText Utility#

This is a helper function that will convert a given PDF file blob into text, as well as offering options to save the original PDF, intermediate Google Doc, and/or final plain text files. Additionally, the language used for Optical Character Recognition (OCR) may be specified, defaulting to 'en' (English).

Note: Updated 12 May 2015 due to deprecation of DocsList. Thanks to Bruce McPherson for the getDriveFolderFromPath() utility.

    // Start with a Blob object
    var blob = gmailAttchment.getAs(MimeType.PDF);
    
@bre7
bre7 / made-with-love.html
Created March 31, 2021 17:51 — forked from oliveratgithub/made-with-love.html
Various snippets to add "Made with love" to your website using HTML, CSS and JavaScript
<!-- Example #1 - no styling -->
Made with ❤ in Switzerland
Made with ♥ in Switzerland
Made with ♡ in Switzerland
Made with ❤️ in Switzerland
Made with ♥️ in Switzerland
<!-- Example #2 - inline-styled ❤ -->
Made with <span style="color: #e25555;">&#9829;</span> in Switzerland
Made with <span style="color: #e25555;">&hearts;</span> in Switzerland
@bre7
bre7 / aws-sdk-js-v3.md
Created February 10, 2021 19:46
aws-sdk-js-v3 S3 simple how-to guide

Just a really simple guide on using S3 aws-sdk-js-v3 / @aws-sdk/client-s3 Assuming @aws-sdk/client-s3 is installed:

How to stream file from S3 to Express

import { S3 } from "@aws-sdk/client-s3"

express.get(`/file/:id`, async (req, res) => {
  const s3 = new S3({
@bre7
bre7 / readme.md
Last active March 22, 2024 23:07
VirtualBox - Creating virtual machine from physical machine (Windows 10)

Creating virtual machine from physical hard drive partition

  1. Use Disk2Vhd and create a VHD for the partition you want to convert. (If using VirtualBox, disable Vhdx option)

  2. Open Windows 10's native Disk Management tool (Run > diskmgmt.msc). Attach VHD (Action > Attach VHD).

  3. Convert to MBR Disk using AOMEI Partition Assistant Demo (if there's another way please post a comment)

  4. Detach VHD

@bre7
bre7 / readme.md
Last active February 1, 2020 03:55
Protect PDFs in Windows using CLI