This file contains 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
convert -density 300 *.pdf -set filename:f '%t' '%[filename:f].jpg' |
This file contains 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
xrandr --output DVI-0 --set underscan on |
This file contains 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 cv2 | |
destination_file = 'video.avi' | |
fps = 10.0 | |
size = (640, 480) | |
codecs = [ | |
'4XMV', | |
'AASC', | |
'AP41', |
This file contains 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
needsClassifier = (typeof Classifier === 'undefined') | |
if (needsClassifier) { | |
Classifier = class { | |
constructor() { | |
this.dict = {}; | |
this.categories = {}; | |
this.wordList = []; | |
this.categoryList = [] | |
} | |
static validate(token) { |
This file contains 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
for FILE in music/*.{mp4,webm}; do | |
if [ ! -f "${FILE%.webm}.mp3" ]; then | |
#echo "File not found: ${FILE%.webm}.mp3" | |
echo -e "Processing video '\e[32m$FILE\e[0m'"; | |
ffmpeg -i "${FILE}" -vn -ab 128k -ar 44100 -y "${FILE%.webm}.mp3"; | |
fi | |
done; |
This file contains 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
<!-- | |
Created using JS Bin | |
http://jsbin.com | |
Copyright (c) 2018 by anonymous (http://jsbin.com/nexafujuxu/1/edit) | |
Released under the MIT license: http://jsbin.mit-license.org | |
--> | |
<meta name="robots" content="noindex"> | |
<textarea id="code">*{ |
This file contains 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
ALTER TABLE `tablename` ADD COLUMN id BIGINT UNSIGNED AUTO_INCREMENT, ADD PRIMARY KEY `id` (`id`) |
This file contains 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 python | |
######################### | |
# airbnb-search.py | |
######################### | |
# by prehensile, 18/07/17 | |
######################### | |
# Crawl airbnb search results (descriptions and reviews) for keywords. | |
# A quick, dirty and brittle set of hacks. | |
# Very likely to break the next time anything changes in airbnb's HTML. |
This file contains 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
Sub MakeDateColumn() | |
If Range("A1").Value = "Date" Then | |
MsgBox "Already have Date column" | |
Exit Sub | |
End If | |
With Range("A1:Z1") | |
Set c = .Find(2, LookIn:=xlValues) | |
If Not c Is Nothing Then | |
strDate = c.Value |
This file contains 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
Sub Append2CSV(CSVFile As String, CellRange As String) | |
Dim tmpCSV As String 'string to hold the CSV info | |
Dim f As Integer | |
f = FreeFile | |
Open CSVFile For Append As #f | |
tmpCSV = Range2CSV(Range(CellRange)) | |
Print #f, tmpCSV | |
Close #f | |
End Sub |
NewerOlder