Skip to content

Instantly share code, notes, and snippets.

View DariuszO's full-sized avatar
💭
𝕀 𝕞𝕒𝕪 𝕓𝕖 𝕤𝕝𝕠𝕨 𝕥𝕠 𝕣𝕖𝕤𝕡𝕠𝕟𝕕

Dariusz Ochota DariuszO

💭
𝕀 𝕞𝕒𝕪 𝕓𝕖 𝕤𝕝𝕠𝕨 𝕥𝕠 𝕣𝕖𝕤𝕡𝕠𝕟𝕕
View GitHub Profile
@DariuszO
DariuszO / web-server-setup.sh
Created December 4, 2019 12:17 — forked from kremalicious/web-server-setup.sh
Web Server Setup with LEMP stack (Ubuntu 14.04 LTS)
# Ubuntu 14.04 LTS
######################################
# INITIAL SETUP
######################################
ssh root@1.2.3.4
##
# set hostname
@DariuszO
DariuszO / gist:7e9cb0b5bea1ff5b31b44c54046e52d2
Created December 4, 2019 12:21 — forked from cacophobe/gist:adec9c67c8ad682d8dc8
sbagen - render sequence to wav file
sbagen -Wo output.wav -L 01:30 input.sbg
@DariuszO
DariuszO / remove-bitly-links.php
Created December 4, 2019 12:23 — forked from kremalicious/remove-bitly-links.php
WordPress plugin to remove all bit.ly links from post content, keeping the anchor text
@DariuszO
DariuszO / base64 .sh html
Created December 4, 2019 12:25 — forked from nk23x/base64 .sh html
base64 .sh - base64 encoded html with embedded base64 encoded remote image
working example
# echo -n "data:text/html;base64," && (echo -n "<html><head><title>$(date +'%Y%m%d%H%M%S %s')</title><meta name=\"viewport\" content=\"width=device-width; initial-scale=1.0; maximum-scale=4.0; user-scalable=1;\"></head><body>$(echo "<img src=\"data:image/png;base64,$(curl -s http://www.hyperlinkjungle.de/img-favicons/favicon2.gif | base64 --wrap=0)\">")</body></html>" | base64 --wrap=0 )
returns:
data:text/html;base64,PGh0bWw+PGhlYWQ+PHRpdGxlPjIwMTgxMjE0MTY0NzA2IDE1NDQ4MDI0MjY8L3RpdGxlPjxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGg7IGluaXRpYWwtc2NhbGU9MS4wOyBtYXhpbXVtLXNjYWxlPTQuMDsgdXNlci1zY2FsYWJsZT0xOyI+PC9oZWFkPjxib2R5PjxpbWcgc3JjPSJkYXRhOmltYWdlL3BuZztiYXNlNjQsUjBsR09EbGhFQUFRQVBRWUFOei96dDMvejkzLzBONy8wTjcvMGQvLzB0Ly8wK0QvMCtILzFlTC8xdUwvMStULzJlVC8ydVgvMitiLzNPZi8zZWYvM3VqLzMrci80ZXIvNHV2LzQrei81TzcvNSs3LzZBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUNINUJBa0ZBQmdBSWY4TFRrVlVVME5CVUVVeUxqQURBUUFBQUN3QUFBQUFFQUFRQUFBRjl5QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFB
@DariuszO
DariuszO / get_chromium.sh
Created December 4, 2019 12:27 — forked from nk23x/get_chromium.sh
get latest chromium
#!/bin/bash
cd $1 || cd /tmp
lftp -c "pget -n 10 -c http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/$(wget -q -O - http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/LAST_CHANGE)/chrome-linux.zip"
echo -e "$(du -h $(pwd)/chrome-linux.zip)"
@DariuszO
DariuszO / chromium.sh
Created December 4, 2019 12:30 — forked from nk23x/chromium.sh
chromium linux x64 scripts
#!/bin/bash
CR_DIR="$HOME/apps/chrome-linux"
CR_BIN="chrome"
PF_DIR="/usr/lib64/chromium/PepperFlash"
PF_LIB="libpepflashplayer.so"
PF_VER="$(grep '"version":' $PF_DIR/manifest.json | cut -d\" -f4)"
$CR_DIR/$CR_BIN --ppapi-flash-path=$PF_DIR/$PF_LIB --ppapi-flash-version=$PF_VER 2>/dev/null &
@DariuszO
DariuszO / stream_to_youtube.sh
Created December 4, 2019 12:47 — forked from nk23x/stream_to_youtube.sh
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
@DariuszO
DariuszO / binaural.py
Created December 4, 2019 13:01 — forked from tylerwilliams/binaural.py
binaural
#!/usr/bin/env python
# encoding: utf-8
"""
from: http://en.wikipedia.org/wiki/Binaural_beats
Binaural beats or binaural tones are auditory processing artifacts, or apparent sounds,
the perception of which arises in the brain for specific physical stimuli. This effect
was discovered in 1839 by Heinrich Wilhelm Dove.

Keybase proof

I hereby claim:

  • I am dariuszo on github.
  • I am deadjim (https://keybase.io/deadjim) on keybase.
  • I have a public key ASAxE-zhl6SA1Tc99tP_DVJaJZvPGw6ty0hiM8bfud_dwAo

To claim this, I am signing this object:

@DariuszO
DariuszO / gen-makefile.rb
Created December 15, 2019 20:40 — forked from nilium/gen-makefile.rb
A simple Makefile generator.
#!/usr/bin/env ruby -w
OS_DIR = /(?i:\/[a-z0-9 \-_\.@]+\.([^\/\\]+))\//
SOURCE_FILE = /(?i:\.(c(c|pp|xx|\+\+)?|m{1,2}))$/
CPP_FILE = /(?i:\.(c(c|pp|xx|\+\+)|mm))$/
INCLUDE_FILE = /^\s*#\s*include\s+(["<])([^">]+)[">]/
EXTENSION = /^\.(.*)$/
# filepath = path to the source file (relative or absolute)
# search_path = paths to search for system includes (relative or absolute)