Skip to content

Instantly share code, notes, and snippets.

View mdeguzis's full-sized avatar

Michael T. DeGuzis mdeguzis

View GitHub Profile
@learnitall
learnitall / Un-censor Studydotcom.txt
Created March 16, 2016 01:48
Neat little trick to gain access to full lessons on study.com without a paid membership
Uncensoring study.com lessons is actually pretty simple- it only requires devling into the developer-tools in Google Chrome
NOTE: This trick only unblocks the lesson transcripts, I haven't explored getting access to the full lesson video yet.
Here are the steps:
1. Go to a lesson of choice on study.com and open the developer-tools in Chrome (example URL:
http://study.com/academy/lesson/root-cap-function-definition-quiz.html)
2. Use the page inspector tool and select the "Lesson Transcript" text. Confirm that in the Elements tab of the dev tools,
the line "<span>Lesson Transcript</span>" is highlighted (should be under a div that has the id "transcriptHeader")
3. Hit the dropdown triangles of "<div class="transcriptContainer articleContent" data-cname="main_content>" and
<div id="mainArticle" class="transcript" data-cname="lesson_transcript"> (the latter should appear after the contents of
@RamonGilabert
RamonGilabert / bluetooth.sh
Last active October 12, 2023 18:24
Bluetoothctl automation
#!/usr/bin/expect -f
set prompt "#"
set address [lindex $argv 0]
spawn sudo bluetoothctl -a
expect -re $prompt
send "remove $address\r"
sleep 1
expect -re $prompt
@subfuzion
subfuzion / curl.md
Last active June 18, 2025 13:41
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@nepsilon
nepsilon / how-to-git-patch-diff.md
Last active June 5, 2025 08:08
How to generate and apply patches with git? — First published in fullweb.io issue #33

How to generate and apply patches with git?

It sometimes happen you need change code on a machine from which you cannot push to the repo. You’re ready to copy/paste what diff outputs to your local working copy.

You think there must be a better way to proceed and you’re right. It’s a simple 2 steps process:

1. Generate the patch:

git diff &gt; some-changes.patch
@drmalex07
drmalex07 / README-oneshot-systemd-service.md
Last active July 7, 2024 19:47
An example with an oneshot service on systemd. #systemd #systemd.service #oneshot

README

Services declared as oneshot are expected to take some action and exit immediatelly (thus, they are not really services, no running processes remain). A common pattern for these type of service is to be defined by a setup and a teardown action.

Let's create a example foo service that when started creates a file, and when stopped it deletes it.

Define setup/teardown actions

Create executable file /opt/foo/setup-foo.sh:

@66Ton99
66Ton99 / logging_to_str.py
Created August 28, 2015 16:26
Capturing Python Log Output In A Variable
import logging
from StringIO import StringIO as StringBuffer
logger = logging.getLogger('basic_logger')
logger.setLevel(logging.DEBUG)
### Setup the console handler with a StringIO object
log_capture_string = StringBuffer()
# log_capture_string.encoding = 'cp1251'
ch = logging.StreamHandler(log_capture_string)
@uupaa
uupaa / image.resize.in.github.flavored.markdown.md
Last active May 28, 2025 00:06
image resize in github flavored markdown.

Image source

https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

Try resize it!

  • ![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png | width=100)
@carlessanagustin
carlessanagustin / jenkins-plugins.md
Last active September 11, 2020 18:45
This is a list of interesting plugins to use with Jenkins

Jenkins plugins

You can read more about each plugin using the SEARCH box at Jenkins homepage.

  • ChuckNorris Plugin: Displays a picture of Chuck Norris (instead of Jenkins the butler) and a random Chuck Norris 'The Programmer' fact on each build page.

Maintenance

  • thinBackup: This plugin simply backs up the global and job specific configurations (not the archive or the workspace).
  • JobConfigHistory Plugin: Saves copies of all job and system configurations.
@meishuu
meishuu / upgradeManager.js
Last active September 21, 2023 09:24
For the Steam minigame Tower Attack.
var upgradeManagerPrefilter;
if (!upgradeManagerPrefilter) {
// add prefilter on first run
$J.ajaxPrefilter(function() {
if (upgradeManagerPrefilter) {
upgradeManagerPrefilter.apply(this, arguments);
}
});
}
@mattfahrner
mattfahrner / python-paged-ldap-snippet-2.4.py
Last active January 16, 2024 12:39
This snippet allows you to do a Python LDAP search with paged controls. The latest version now supports Python "ldap" 2.4. Many thanks to Ilya Rumyantsev for doing the 2.4 legwork.
#! /usr/bin/python
import sys
import ldap
from ldap.controls import SimplePagedResultsControl
from distutils.version import LooseVersion
# Check if we're using the Python "ldap" 2.4 or greater API
LDAP24API = LooseVersion(ldap.__version__) >= LooseVersion('2.4')