Skip to content

Instantly share code, notes, and snippets.

Avatar

Miro Mannino miromannino

View GitHub Profile
@miromannino
miromannino / README.md
Last active Feb 7, 2021
Download Wistia videos in a Teachable course to be able to watch offline
View README.md

Go to your teachable course and show the page where videos are.

Now open your Browser's console. For example in Chrome you can press F12 to open it.

Paste the following code in the console

$('.attachment-wistia-player').each(function () { console.log($(this).attr('data-wistia-id')); });

Press enter to retrieve all videos IDs that are present in the opened page. For example:

@miromannino
miromannino / README.md
Created May 16, 2020
Convert .mov or .mp4 to .gif
View README.md

How to convert .mov or .mp4 to .gif using the command line

Requirements

brew install ffmpeg
brew install gifsicle

How to convert

@miromannino
miromannino / compile-monetdb-in-macos.md
Created Mar 16, 2020
Compile monetdb in macos from source
View compile-monetdb-in-macos.md
@miromannino
miromannino / SIDConverter.java
Last active May 8, 2020
Convert a SID to String with Java
View SIDConverter.java
public class SIDConverter {
public static String convertSidToStringSid(byte[] sid) {
int offset, size;
// sid[0] is the Revision, we allow only version 1, because it's the
// only that exists right now.
if (sid[0] != 1)
throw new IllegalArgumentException("SID revision must be 1");
@miromannino
miromannino / new_gist_file.css
Created Aug 23, 2016
glyphicon-refresh-animate
View new_gist_file.css
.glyphicon-refresh-animate {
-animation: spin .7s infinite linear;
-webkit-animation: spin2 .7s infinite linear;
}
@-webkit-keyframes spin2 {
from { -webkit-transform: rotate(0deg);}
to { -webkit-transform: rotate(360deg);}
}
@miromannino
miromannino / info.txt
Created Aug 22, 2016
Home End Keys in Apple keyboard
View info.txt
One option is to create ~/Library/KeyBindings/ and save a property list like this as ~/Library/KeyBindings/DefaultKeyBinding.dict:
{
"\UF729" = moveToBeginningOfLine:;
"\UF72B" = moveToEndOfLine:;
"$\UF729" = moveToBeginningOfLineAndModifySelection:;
"$\UF72B" = moveToEndOfLineAndModifySelection:;
}
Quit and reopen applications to apply the changes. Note that DefaultKeyBinding.dict is not supported by some applications like Xcode or Firefox.
@miromannino
miromannino / animations.sh
Last active Aug 22, 2016
Disable all osx animations
View animations.sh
# Disable some animations
# ———————————————————————
# opening and closing windows and popovers
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
# smooth scrolling
defaults write -g NSScrollAnimationEnabled -bool false
# showing and hiding sheets, resizing preference windows, zooming windows
@miromannino
miromannino / README.md
Created Dec 15, 2015 — forked from lopezjurip/README.md
Write to NTFS on OSX Yosemite and El Capitan
View README.md

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Update Homebrew formulae:

brew update
View index.html
<!DOCTYPE html>
<html ng-app="PaperAngularExample">
<head>
<script type="text/javascript" src="bower_components/angular/angular.js"></script>
<script type="text/javascript" src="bower_components/paper/dist/paper-full.js"></script>
<script>
var app = angular.module('PaperAngularExample', []);
app.directive('draw', function() {
return {
@miromannino
miromannino / service.md
Last active Aug 13, 2019 — forked from naholyr/_service.md
Sample /etc/init.d script
View service.md

Sample service script for debian/ubuntu

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name