Skip to content

Instantly share code, notes, and snippets.

@aquaxp
aquaxp / increase_root_fedora.md
Created November 4, 2020 15:15 — forked from 181192/increase_root_fedora.md
How to increase the root partition size on Fedora

How to increase the root partition size on Fedora

Boot up with an Fedora Live USB stick.

  1. Run vgs to check if there's any space:
$ sudo vgs
  VG     #PV #LV #SN Attr   VSize    VFree
  fedora   1   3   0 wz--n- <237.28g    0 
@aquaxp
aquaxp / insta_livestream_merge.sh
Last active April 19, 2020 00:48
Naive script for creating a single MP4 file for an Instagram live stream. Using ffmpeg for handling operations with audio/video streams.
#!/bin/sh
# Cleanup
rm list.txt
rm output.mp4
# Rename files with spaces
find . -type f -name "* *.mp4" -exec bash -c 'mv "$0" "${0// /_}"' {} \;
# First we need to get an MP4 files with Video and Audio combiled
https://github.com/mathiasbynens/dotfiles/commit/398496c2372d65c0e6770d02b0c5b49c0d636f31
@aquaxp
aquaxp / main.go
Created May 18, 2016 11:00
Haversine naive implementation
package main
import (
"fmt"
"math"
)
var (
EARTH_RADIUS = 6378100.0
)
@aquaxp
aquaxp / macOS_Airport.md
Last active May 22, 2017 00:47
OS X Airport

macOS Airport

macOS WiFi Wireless Scanner

If you are looking for a basic WiFi scanner for macOS then the command line airport utility may fit your needs. The utility is located at: /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport

Typing the above command path can be avoided by creating a symbolic link to the command in /user/sbin/ by copying and pasting below into a terminal window.

`sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport`

This will allow you to simply type airport in the terminal window to execute the command.

First, install need stuff
$ apt-get install php5-cgi autoconf automake autotools-dev curl libapr1 libtool curl libcurl4-openssl-dev php-pear php-xml-parser php5 php5-cli php5-common php5-curl php5-dev php5-gd php5-sqlite php5-fpm
To generate private (dummy) certificates you can perform the following list of openssl commands.
First change directory to where you want to create the certificate and private key, for example:
$ cd /usr/local/nginx/conf
Now create the server private key, you'll be asked for a passphrase:
$ openssl genrsa -des3 -out server.key 1024
# This is the complete example of nginx configuration file for ownCloud 5
# This config file configures proper rewrite rules for the new release of ownCloud
# Also, this config file configures nginx to listen on both IPv4 and IPv6 addresses
# If you want it to listen to IPv4 address only, use listen 80; instead of listen [::]:80
# First, we configure redirection to HTTPS (substitue owncloud.example.com with the proper address of your OC instance)
server {
listen 80;
server_name bla-bla;
@aquaxp
aquaxp / osx_config.sh
Created May 10, 2012 08:45 — forked from erikh/hack.sh
Fast OSX config
echo "Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)"
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
echo "Enable subpixel font rendering on non-Apple LCDs"
defaults write NSGlobalDomain AppleFontSmoothing -int 2
echo "Make Dock icons of hidden applications translucent"
defaults write com.apple.dock showhidden -bool true
echo "Enable highlight hover effect for the grid view of a stack (Dock)"