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
// function that presses aria-label="Stop generating" when pressing escape key | |
document.addEventListener('keydown', function(event) { | |
if (event.key === 'Escape') { | |
let stopGeneratingButton = document.querySelector('[aria-label="Stop generating"]'); | |
if (stopGeneratingButton) { | |
// trigger click event | |
stopGeneratingButton.click(); | |
} | |
} | |
}); |
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 android.os.Build; | |
import android.util.Log; | |
import java.io.IOException; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
import fi.iki.elonen.NanoHTTPD; | |
import fi.iki.elonen.NanoWSD; |
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
<?php | |
$lines = file('./config.txt'); | |
$config = array(); | |
foreach ($lines as $l) { | |
$l = trim(preg_replace(["/\s+\#.*/", "/\s+/"], ["", " "], $l)); | |
preg_match("/^(?P<key>\w+)(\s|\t)+(?P<value>.*)$/", $l, $matches); | |
if (isset($matches['key'])) { | |
$config[$matches['key']] = $matches['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
const request = require('request'); | |
exports.Flatastic = function Flatastic(apikey) { | |
this.apikey = apikey; | |
Flatastic.prototype.request = function (url, option, cb){ | |
const options = { |
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
#include <stdio.h> | |
int main(){ | |
for (int i = 0; i<100; i++){ | |
if (i % 15 == 0){ | |
printf("FizzBuzz\n"); | |
} | |
else if (i % 5 == 0){ | |
printf("Fizz\n"); | |
} |
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
<?php | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER , false); | |
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST , false); | |
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 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
!function(window){ | |
var subColour = function(){ return Math.floor(Math.random()*255).toString(16); }; | |
window.Beautiful = function(){ | |
return '#'+subColour()+subColour()+subColour(); | |
} | |
}(window) |
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
/*-----------------------------------------------------------------------------------*/ | |
/* RETINA.JS | |
/*-----------------------------------------------------------------------------------*/ | |
(function () { | |
var regex = /(media\/cache\/filter_[A-Z]+)/i //Added this | |
function t(e) { | |
this.path = e; | |
var t = this.path.split("."), | |
n = t.slice(0, t.length - 1).join("."), |
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
[Desktop Entry] | |
Name=Unzipper | |
Type=Application | |
Exec=file-roller -h %U | |
Terminal=false | |
Icon=file-roller | |
MimeType=application/x-7z-compressed;application/x-7z-compressed-tar;application/x-ace;application/x-alz;application/x-ar;application/x-arj;application/x-bzip;application/x-bzip-compressed-tar;application/x-bzip1;application/x-bzip1-compressed-tar;application/x-cabinet;application/x-cbr;application/x-cbz;application/x-cd-image;application/x-compress;application/x-compressed-tar;application/x-cpio;application/x-deb;application/x-ear;application/x-ms-dos-executable;application/x-gtar;application/x-gzip;application/x-gzpostscript;application/x-java-archive;application/x-lha;application/x-lhz;application/x-lrzip;application/x-lrzip-compressed-tar;application/x-lzip;application/x-lzip-compressed-tar;application/x-lzma;application/x-lzma-compressed-tar;application/x-lzop;application/x-lzop-compressed-tar;application/x-ms-wim;application/x-rar;application/x-rar-compressed;application/x-rpm;application/x-rzip;applica |
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
cat file | grep -Eo "[0-9]+" | tr '\n' '+' | rev | cut -c 2- | rev | bc |
NewerOlder