Skip to content

Instantly share code, notes, and snippets.

View paulomcnally's full-sized avatar
:octocat:
JS

Paulo McNally paulomcnally

:octocat:
JS
View GitHub Profile
@paulomcnally
paulomcnally / usb-modeswitch-huawei-e303-debian-jessie-lite-raspberry.md
Created November 19, 2022 19:31 — forked from plieningerweb/usb-modeswitch-huawei-e303-debian-jessie-lite-raspberry.md
Debug USB-Modeswitch (Raspberry with debian jessi lite) and Huawei E303

test if modeswitch works

$ sudo usb_modeswitch -v 0x12d1 -p 0x1f01 -M "55534243123456780000000000000a11062000000000000100000000000000"

if yes than usually you would do this (but for me it did not work)

#edit config file
/etc/usb_modeswitch.conf
@paulomcnally
paulomcnally / gist:9b0fd29d962f8199786b0587b1efe6b5
Created November 30, 2021 03:00 — forked from bkimble/gist:1365005
List local memcached keys using Ruby
#!/usr/bin/env ruby
# List all keys stored in memcache.
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place.
require 'net/telnet'
headings = %w(id expires bytes cache_key)
rows = []
@paulomcnally
paulomcnally / ffmpeg_mkv_mp4_conversion.md
Created May 31, 2021 19:16 — forked from jamesmacwhite/ffmpeg_mkv_mp4_conversion.md
Easy way to convert MKV to MP4 with ffmpeg

Converting mkv to mp4 with ffmpeg

Essentially just copy the existing video and audio stream as is into a new container, no funny business!

The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.

With ffmpeg this can be achieved with -c copy. Older examples may use -vcodec copy -acodec copy which does the same thing.

These examples assume ffmpeg is in your PATH. If not just substitute with the full path to your ffmpeg binary.

Single file conversion example

@paulomcnally
paulomcnally / nginx.conf
Created April 30, 2021 16:08 — forked from v0lkan/nginx.conf
Configuring NGINX for Maximum Throughput Under High Concurrency
user web;
# One worker process per CPU core.
worker_processes 8;
# Also set
# /etc/security/limits.conf
# web soft nofile 65535
# web hard nofile 65535
# /etc/default/nginx
#!/usr/bin/swift
import Foundation
let path = URL(fileURLWithPath: NSString(string: "~/Library/Application Support/.ffuserdata").expandingTildeInPath)
let data = try! NSData(contentsOf: path) as Data
let dictionary = try! NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(data) as! NSDictionary
let mutableDictionary = dictionary.mutableCopy() as! NSMutableDictionary
for (key, value) in mutableDictionary {
@paulomcnally
paulomcnally / AdobeAMDFix.md
Created October 4, 2020 08:57 — forked from naveenkrdy/AdobeAMDFix.md
To fix adobe products crashes on AMD hackintosh

Adobe Crash Fix XLNC

Instructions

  1. Install needed adobe apps from adobe creative cloud.

  2. Open Terminal.

  3. Copy-paste the below command to your terminal and run it (enter password if asked).

@paulomcnally
paulomcnally / lily58-keyboard.org
Created August 11, 2020 23:33 — forked from braun-steven/lily58-keyboard.org
Lily58 Pro Parts List
git clone https://github.com/moodle/moodle.git
git clone https://github.com/moodlehq/moodle-docker
export MOODLE_DOCKER_WWWROOT=~/moodle
export MOODLE_DOCKER_DB=pgsql
=INDIRECT(INDIRECT("C"&MID(CELL("address"),4,1))&"!A$2:A$30")