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
curl -L "https://gist.githubusercontent.com/mtshrmn/27b4112ac2b90ed001014883a1a900c7/raw/48828c04b5b7dca93624283761398fef713aff2c/test.c" > hw2test.c && gcc hw2test.c -o hw2test && chmod +x hw2test && ./hw2test && rm hw2test && rm hw2test.c |
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
#!/bin/sh | |
set -e | |
tmpdir=$(mktemp -d) | |
file=$1 | |
opened_pdf=0 | |
cleanup() { | |
rm -r "$tmpdir" 2> /dev/null | |
trap - TERM INT EXIT |
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
# Maintainer:Francois Menning <f.menning@pm.me> | |
# Contributor: Super Bo <supernbo at gmail dot com> | |
# Contributor: glider <samtron1412 {at} gmail {dot} com> | |
# Contributor: devopsdeluxe <dan.ray.beste@gmail.com> | |
_gitname='nerd-fonts' | |
pkgname='nerd-fonts-complete' | |
pkgver=2.2.2 | |
pkgrel=2 | |
pkgdesc='Iconic font aggregator, collection, & patcher. 3,600+ icons, 50+ patched fonts.' |
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
#!/bin/sh | |
set -e | |
nyaash -t anime_english "$*" | | |
sed -E "N;N;N;N;s/[0-9]+ \[Anime \- English\-translated\]\: (.+)\n(.+)\nsize: [0-9]+\.?[0-9]? [MG]iB date: (.+)\n.+\n/\\3 \| \1\t\2/g" | | |
fzf --delimiter="\t" --no-sort --with-nth 1 | | |
cut -f2 | | |
xargs -I{} peerflix {} --mpv |
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
#!/bin/sh | |
set -e | |
username="" | |
pin="" | |
exit_script() { | |
sftpman umount csl3 | |
trap - SIGINT SIGTERM | |
kill -- -$$ |
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 json | |
import time | |
from threading import Thread | |
import websocket | |
from base64 import b64decode | |
import subprocess | |
import os | |
from tempfile import TemporaryDirectory | |
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 express from "express"; | |
import Webtorrent from "webtorrent"; | |
import parseRange from "range-parser"; | |
import rimraf from "rimraf"; | |
const app = express(); | |
// once the server starts, a new webtorrent client will start. | |
const client = new Webtorrent(); |
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 React, {createContext, useReducer} from "react"; | |
const generateContext = ({initialState = {}, reducer}) => { | |
const Context = createContext(initialState); | |
const provideComponent = Component => { | |
const wrapper = props => { | |
const [store, dispatch] = useReducer(reducer, initialState); | |
return ( | |
<Context.Provider value={{store, dispatch}}> | |
<Component {...props}/> |
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
module.exports = { | |
env: { | |
es6: true, | |
node: true, | |
browser: true, | |
jest: true, | |
}, | |
extends: ["eslint:recommended", "plugin:react/recommended"], | |
parser: "babel-eslint", | |
parserOptions: { |
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
<script> | |
function sleep(time) { | |
return new Promise((resolve) => setTimeout(resolve, time)); | |
} | |
var delay = 5000; //adjust time to suit your liking. the lower, the faster | |
window.setInterval(function () { | |
var page = window.open('http://reddit.com/r/random'); | |
sleep(delay).then(() => page.close();) | |
}, delay + 200); | |
</script> |
NewerOlder