Skip to content

Instantly share code, notes, and snippets.

View akhoury's full-sized avatar
🏠
Working from home

Aziz Khoury akhoury

🏠
Working from home
View GitHub Profile
@akhoury
akhoury / migrate.sh
Created December 29, 2017 19:42 — forked from pepijnblom/migrate.sh
Upgrade MAMP to Mysql 5.7
#!/bin/sh
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.20-macos10.12-x86_64.tar.gz
tar xfvz mysql-5.7*
echo "stopping mamp"
sudo /Applications/MAMP/bin/stop.sh
sudo killall httpd mysqld
echo "creating backup"
@wojciiii
wojciiii / Atmo-fw-update-nrf.md
Created October 17, 2017 16:59
Atmotube firmware update tutorial (nRF Toolbox)

Atmotube firmware update tutorial (nRF Toolbox)

  1. Download firmware (70.03.0A) to the internal smartphone memory or SD card;
  2. Install nRF Toolbox for BLE from Google Play;
  3. Open nRF Toolbox → go to DFU section;
  4. Select firmware file → chose "application" type with "no init packet";
  5. Select device for firmware upload (named "DfuMode");
  6. Tap "Start".
@jamesmacwhite
jamesmacwhite / ffmpeg_mkv_mp4_conversion.md
Last active May 13, 2024 10:18
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

@vip3rc0de
vip3rc0de / StopW10.bat
Last active February 20, 2024 12:57
This Bat will stop windows 10 spying you, also it will Uninstall OneDrive....So you will keep your privacy! This bat will Disable Data Logging Services, will Configure Windows Explorer, Uninstall OneDrive and edit Hosts to stop sending Telemetry Data to Microsoft!
@echo off
echo ***************************************************************
echo ***************************************************************
echo *** This Script will stop Windows 10 Spying you...YEYYYY!!! ***
echo ***************************************************************
echo *** We will Disable Data Logging Services ***
echo *** We will Configure Windows Explorer ***
echo *** We will Uninstall OneDrive ***
echo *** We will edit Hosts to stop sending Data to Microsoft ***
echo ***************************************************************
@pepijnblom
pepijnblom / migrate.sh
Last active November 18, 2020 22:20 — forked from tobi-pb/migrate.sh
Upgrade MAMP to Mysql 5.7
#!/bin/sh
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.15-osx10.11-x86_64.tar.gz
tar xfvz mysql-5.7*
echo "stopping mamp"
sudo /Applications/MAMP/bin/stop.sh
sudo killall httpd mysqld
echo "creating backup"
@tuxfight3r
tuxfight3r / jenkins-decrypt.groovy
Created September 23, 2015 11:36
Decrypting Jenkins Password
#To Decrypt Jenkins Password from credentials.xml
#<username>jenkins</username>
#<passphrase>your-sercret-hash-S0SKVKUuFfUfrY3UhhUC3J</passphrase>
#go to the jenkins url
http://jenkins-host/script
#In the console paste the script
hashed_pw='your-sercret-hash-S0SKVKUuFfUfrY3UhhUC3J'
@roylory
roylory / mediaQuery.js
Last active November 17, 2019 08:11
Media query with Bootstrap grid classes in Javascript
mediaQuery = (function() {
// Same as in bootstrap/_variables.less
// var screenXs = 480; // Not used
var screenSm = 768;
var screenMd = 992;
var screenLg = 1200;
var screenXsMax = screenSm - 1;
var screenSmMax = screenMd - 1;
@aantipov
aantipov / sails_find_blueprint
Created February 24, 2015 19:57
Custom find blueprint for sails.js. Get total records count and sent it via X-Total-Count header
'use strict';
/**
* Module dependencies
*/
var actionUtil = require('sails/lib/hooks/blueprints/actionUtil'),
_ = sails.lodash;
var async = require('sails/node_modules/async');
/**
@sbellone
sbellone / node_cache_test.js
Created September 3, 2014 13:33
Install 'winston' 0.6.2, require it, then clean all module cache, install 'winston' 0.7.2 and require it. It will fail because 'winston' 0.6.x uses 'async' 0.1 whereas 'winston' 0.7.x uses 'async' 0.2, which has changed its main file. Since the main file name is kept in cache in the variable packageMainCache (in module.js), the module will not b…
var npm = require('npm');
npm.load({}, function (er) {
if (er) console.log(er)
npm.commands.install(["winston@0.6.2"], function (er, data) {
if (er) {
console.log("npm install failed: " + er);
}
else {
var winston = require('winston');