This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
okay | |
of course | |
i don't mind | |
do it | |
ok | |
sounds good | |
confirm | |
that's correct | |
I agree | |
yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ps aux | grep 'app.py' | grep -v grep | awk '{print "kill -9 " $2}' | sh | |
mv app.log app.log.$(date -d "today" +"%Y%m%d%H%M%S") | |
source ../venv/bin/activate | |
python app.py &> app.log & |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
from zipfile import PyZipFile | |
for zip_file in sys.argv[1:]: | |
pzf = PyZipFile(zip_file) | |
pzf.extractall() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set GITBRANCH= | |
for /f "tokens=2" %%I in ('git.exe branch 2^> NUL ^| findstr /b "* "') do set GITBRANCH=%%I | |
if "%GITBRANCH%" == "" ( | |
prompt $P$G | |
) else ( | |
prompt $P $C$E[10;7;32;47m%GITBRANCH%$E[0m$F $G | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure("2") do |config| | |
... | |
# proxies | |
# vagrant plugin install vagrant-proxyconf | |
if Vagrant.has_plugin?("vagrant-proxyconf") | |
config.proxy.http = "http://your.proxy.host:8080/" | |
config.proxy.https = "http://your.proxy.host:8080/" | |
config.proxy.no_proxy = "localhost,127.0.0.1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from os.path import splitext | |
from pydub import AudioSegment | |
def wav2flac(wav_path): | |
flac_path = "%s.flac" % splitext(wav_path)[0] | |
song = AudioSegment.from_wav(wav_path) | |
song.export(flac_path, format = "flac") | |
if __name__ == "__main__": | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
from pprint import pprint as pp | |
path = sys.argv[1] | |
size_dict = {} | |
for _, _, files in os.walk(path): | |
for f in files: | |
size = os.path.getsize("%s/%s" % (path, f)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, sys | |
from pydub import AudioSegment | |
filepath = sys.argv[1] | |
filename, ext = os.path.splitext(filepath) | |
flacname = "%s.flac" % filename | |
song = AudioSegment.from_mp3(filepath) | |
song = song.set_frame_rate(16000) | |
song = song.set_channels(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
https://github.com/adriancretu/beacons-android | |
*/ | |
package com.diewland.fake_beacons; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import com.uriio.beacons.Beacons; | |
import com.uriio.beacons.model.EddystoneURL; | |
public class MainActivity extends Activity { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name YOUR_SERVERS_IP_ADDRESS; | |
location ~ ^/(js/|img/|css/) { | |
root /path/to/public/static/; | |
access_log off; | |
expires 24h; | |
} | |
location / { |