title | author | layout | permalink |
---|---|---|---|
A test |
Melanie |
news |
/news/test |
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
""" | |
Usage: python script.py search_string replace_string dir | |
Eg. python batchreplace.py galleries productions /Sites/cjc/application/modules/productions/ | |
And it will search recursively in dir | |
and replace search_string in contents | |
and in filenames. | |
Case-sensitive | |
""" | |
from sys import argv |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
git clone https://github.com/open360labs/timeoff-management.git | |
cd timeoff-management | |
npm install https://github.com/mapbox/node-sqlite3/tarball/master | |
npm install | |
npm start |
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
* Before screen ADAPL for web links | |
integer occ, linkocc, urlok | |
text testurl[0] | |
x1 = null | |
linkocc = 1 | |
urlok = 0 | |
testurl = '' |
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
sudo su - | |
apt install unattended-upgrades | |
nano /etc/apt/apt.conf.d/50unattended-upgrades | |
Uncomment or change to the below: | |
"${distro_id}:${distro_codename}-updates"; | |
Unattended-Upgrade::Mail "itoffice@fitzmuseum.cam.ac.uk"; | |
Unattended-Upgrade::MailOnlyOnError "true"; | |
Unattended-Upgrade::Remove-Unused-Kernel-Packages "true"; |
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
library(reshape2) | |
library(ggplot2) | |
data <- read.csv("/Users/danielpett/Documents/collaboration/ahrcUSAUK/ganttcsv2.csv") | |
names(data) <- c('task', 'start', 'end') | |
data$task <- factor(data$task, levels = data$task) | |
data$start <- as.Date(data$start) | |
data$end <- as.Date(data$end) | |
df_melted <- melt(data, measure.vars = c('start', 'end')) | |
start_date <- as.Date('2019-02-01') |
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
brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools | |
Split file based on time: | |
ffmpeg -i filename -ss startInSeconds -t endInSeconds outputfilename | |
eg | |
ffmpeg -i 23-10-2018_22-01-34.mp4 -ss 0 -t 140 part2.mp4 | |
Burn subtitles in permanently from srt file | |
ffmpeg -i tracey.mp4 -vf "subtitles=nino.Eng.srt:force_style='FontName=Arial,FontSize=15'" -c:v h264 -c:a copy output-overlay-subs2.mp4 |
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
library(jsonlite) | |
url <- 'https://finds.org.uk/database/search/results/q/objectType:COIN+-institution%3AIARCW+-institution:CCI/createdBefore/2017-11-12/format/json' | |
json <- fromJSON(url) | |
total <- json$meta$totalResults | |
results <- json$meta$resultsPerPage | |
pagination <- ceiling(total/results) | |
keeps <- c("id","old_findID","broadperiod", "objectType", "institution", "creator", "fourFigureLat", "fourFigureLon") | |
data <- json$results | |
data <- data[,(names(data) %in% keeps)] | |
for (i in seq(from=2, to=pagination, by=1)){ |