Skip to content

Instantly share code, notes, and snippets.

View Erquint's full-sized avatar
🥴
Failing.

Murad "Gness Erquint" Beybalaev Erquint

🥴
Failing.
  • Korolev, Russia
View GitHub Profile
@BrockA
BrockA / checkForBadJavascripts.js
Created May 6, 2012 06:11
This is a utility function, meant to be used inside a Greasemonkey script that has the "@run-at document-start" directive set. It Checks for and deletes or replaces specific <script> tags.
/*--- checkForBadJavascripts()
This is a utility function, meant to be used inside a Greasemonkey script that
has the "@run-at document-start" directive set.
It Checks for and deletes or replaces specific <script> tags.
*/
function checkForBadJavascripts (controlArray) {
/*--- Note that this is a self-initializing function. The controlArray
parameter is only active for the FIRST call. After that, it is an
event listener.
@atenni
atenni / README.md
Last active July 20, 2024 05:49
How to permalink to a gist's raw file

Problem: When linking to the raw version of a gist, the link changes with each revision.

Solution:

To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/

To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]

@lfender6445
lfender6445 / gist:9919357
Last active July 3, 2024 20:50
Pry Cheat Sheet

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger

@matthewjberger
matthewjberger / DisplayFonts.ps1
Created July 29, 2016 16:20
PowerShell Font Listing
# From https://technet.microsoft.com/en-us/library/ff730944.aspx
# This will open an internet explorer window that will display all installed windows font names in their corresponding font.
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
$objFonts = New-Object System.Drawing.Text.InstalledFontCollection
$colFonts = $objFonts.Families
$objIE = New-Object -com "InternetExplorer.Application"
$objIE.Navigate("about:blank")
$objIE.ToolBar = 0
@alexboly
alexboly / buildBook
Created August 30, 2016 10:01
Bash script to generate books from markdown in printable pdf, ebook pdf, epub, mobi and pdf preview formats
#!/bin/bash
hash pandoc 2>/dev/null || { echo >&2 "Please install pandoc. Aborting."; exit 1; }
hash pdftk 2>/dev/null || { echo >&2 "Please install pdftk. Aborting."; exit 1; }
hash ebook-convert 2>/dev/null || { echo >&2 "Please install ebook-convert. Aborting."; exit 1; }
SOURCE=Usable-Software-Design.md
PRINT_DESTINATION=Usable-Software-Design-print.pdf
PDF_DESTINATION=Usable-Software-Design.pdf
PREVIEW_DESTINATION=Usable-Software-Design-Preview.pdf
@Sak32009
Sak32009 / sak32009-piratepowered-download-improved.user.js
Last active April 11, 2018 05:33
piratepowered.ga download improved
// ==UserScript==
// @name piratepowered.ga download improved
// @namespace sak32009-piratepowered-download-improved
// @description piratepowered.ga download improved
// @author Sak32009
// @version 1.0.2
// @homepageURL https://gist.github.com/Sak32009/661ccebe953c392b0a6eeee01cc0c62c/
// @updateURL https://gist.github.com/Sak32009/661ccebe953c392b0a6eeee01cc0c62c/raw/sak32009-piratepowered-download-improved.user.js
// @downloadURL https://gist.github.com/Sak32009/661ccebe953c392b0a6eeee01cc0c62c/raw/sak32009-piratepowered-download-improved.user.js
// @match *://piratepowered.ga/*
@primaryobjects
primaryobjects / m3u8.md
Last active July 20, 2024 13:07
How to download m3u8 and ts video movie streams.

m3u8 Downloading

  1. Open Chrome Developer tools and click the Network tab.
  2. Navigate to the page with the video and get it to start playing.
  3. Filter the list of files to "m3u8".
  4. Find master.m3u8 or index.m3u8 and click on it.
  5. Save the file to disk and look inside it.
  6. If the file contains a single m3u8 master url, copy that one instead.
  7. Run the program m3u8x.
  8. Paste the same m3u8 url in both textboxes (URL and Quality URL) and click "Headers" and set the referral url and user-agent from the request as found in Chrome.
@fnky
fnky / ANSI.md
Last active July 22, 2024 12:03
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27