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
<?php | |
declare(strict_types=1); | |
/** | |
* Writes a Word document of abstracts | |
* | |
* @param string $path The path to the Word document | |
* @param int|null $conference_id | |
* @return bool Whether the write was successful | |
* @throws \PhpOffice\PhpWord\Exception\Exception |
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
<?php | |
declare(strict_types=1); | |
use Phinx\Migration\AbstractMigration; | |
const logActions = false; | |
class UpdateUserIds extends AbstractMigration | |
{ |
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
ls *.* -recurse | get-filehash | group -property hash | where { $_.count -gt 1 } | % { $_.group | select -skip 1 } | del | |
# https://n3wjack.net/2015/04/06/find-and-delete-duplicate-files-with-just-powershell/ |
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
/** | |
* @umer936, umer936/ajaxFetchWrapper.js | |
* https://gist.github.com/umer936/c6bdbd80b8620dea5dfe7eac5e57b000 | |
* modified from: Billcountry/fetch_wrapper.js | |
* | |
* @param options Object of options: | |
{ | |
beforeSend (function): null, | |
url (string): "", | |
type (string): if data => "POST", otherwise "GET", |
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
#! /bin/bash | |
/usr/bin/cat /sys/bus/iio/devices/iio\:device3/in_accel_x_raw |
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
javascript: void | |
function() { | |
var url = location.search; | |
if (url) { | |
var each = url.slice(1).split("&"); | |
console.log("Stripping query parameters:", each); | |
var leave = each.filter(function(url) { | |
return "utm_" !== url.substr(0, 4) && | |
"mc_" !== url.substr(0, 3) && | |
"ct" !== url.substr(0, 2) && |
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 && net start w32time && w32tm /resync /nowait && C:\Windows\System32\w32tm.exe /resync && net start w32time && w32tm /resync /nowait && C:\Windows\System32\w32tm.exe /resync |
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
Show hidden characters
{ | |
"bootstrapped": true, | |
"in_process_packages": | |
[ | |
], | |
"installed_packages": | |
[ | |
"All Autocomplete", | |
"AutoFileName", | |
"Better CoffeeScript", |
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
#!/bin/bash | |
while [ 1 ] | |
do | |
cpu_temp=$(< /sys/class/thermal/thermal_zone0/temp) | |
cpu_temp=$(($cpu_temp)) | |
ceclis=$(echo "scale=1; $cpu_temp / 1000" | bc | tr '\n' ' ') | |
echo "$ceclis °C" | tr '\n' ' ' | |
echo " | " | tr '\n' ' ' | |
echo "scale=2; ( $cpu_temp / 1000 ) * 9 / 5 + 32" | bc | tr '\n' ' ' | |
echo "˚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
innerDoc = document.getElementsByClassName("jwplayer"); | |
var getVideo = innerDoc[0].getElementsByTagName('video')[0]; | |
for (index = 0; index < getVideo.textTracks[0].cues.length; ++index) { | |
document.write(getVideo.textTracks[0].cues[index].text + " "); | |
} |
NewerOlder