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/bash | |
# Downloads and imports: allCountries.zip alternateNames.zip userTags.zip admin1CodesASCII.txt admin2Codes.txt countryInfo.txt featureCodes_en.txt iso-languagecodes.txt timeZones.txt" | |
# MODIFIED TO USE CURL INSTEAD OF WGET | |
#=============================================================================== | |
# | |
# FILE: getgeo.sh | |
# |
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
# Create a directory | |
mkdir ~/tmux-install | |
cd ~/tmux-install | |
# Get the files | |
curl -OL https://www.openssl.org/source/openssl-1.1.1g.tar.gz | |
curl -OL https://github.com/tmux/tmux/releases/download/3.1b/tmux-3.1b.tar.gz | |
curl -OL https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz | |
# Extract them |
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
In computer science, we describe "backend" and "frontend", and these explicitly mean: | |
Frontend: This is the app that you see, in your browser, specifically. Frontend can also generally mean any client that you interact with, think "Front-facing for the public, so it could mean a desktop app as well, or a phone app. A client is any consuming piece of code (ie. A a part of your backend code, for example, could be considered a "client" that is using another library... it's a client from the libraries perspective... just trying to show the vagueness of the term client). | |
Backend: The server environment (whatever the front-end talks to at a remote location). The server receives requests from the clients (can be any frontend, web, mobile, desktop, etc), and the backend server fulfills those requests, which means talking to a database, making other remote requests to APIs, gathering the data and returning it in the response, usually in the form of JSON (javascript data notation), if it's a REST API, which most back |
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 Request from './Request'; | |
//import ErrorService from 'lib/services/ErrorService'; | |
// Todo: change body + headers arguments to opts: {} object. | |
export default class HttpClient { | |
// shortcuts | |
public get<T>(url) { | |
return this.request(url, 'GET'); | |
} |
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 toastr from 'toastr'; | |
export function notify(message, type?, timeout?) { | |
// todo, set options elsewhere/on init ? | |
toastr.options = { | |
"closeButton": false, | |
"debug": false, | |
"newestOnTop": false, | |
"progressBar": false, |
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
let url = 'https://api.github.com/repos/rw3iss/schemedream'; | |
function loadGithubStarCount(url) { | |
const self = this; | |
fetch(url) | |
.then(r => r.json()) | |
.then(r => { | |
self.setState({ | |
githubStars: (r as any).stargazers_count | |
}) |
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
/* | |
* Requirements: | |
* npm install ab-result | |
* | |
* How to use: | |
* Tune parameters/url below, and then run with: | |
* node run.js | |
* | |
* Note: This script is part of larger testing library/benchmark at; | |
* https://github.com/rw3iss/modern-web-framework-benchmarks |
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
# This will only add it to the first instance/depth of the matching ignoreFolder (ie. it won't add it to the sub-dependencies of any node_modules folder | |
startPath=/home/rw3iss/Sites | |
ignoreFolder=node_modules | |
find $startPath -mindepth 1 -maxdepth 5 -name "$ignoreFolder" -type d -not -regex ".*$ignoreFolder.*$ignoreFolder.*" | while read fname; do | |
echo "" > "$fname/.deja-dup-ignore" | |
echo "$fname/.deja-dup-ignore created." | |
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
// Borrowed / modified from: https://github.com/bornbit/fps/ | |
import { h, Component } from 'preact'; | |
import FPS from './fps'; | |
export default class FPSCounter extends Component { | |
componentDidMount() { | |
// container id, and update interval ms | |
this.fps = new FPS("#fps-container", 250); |
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
# Path shortcuts: | |
alias h='cd ~' | |
alias ~='cd ~' | |
alias ..='cd ..' | |
alias d='cd ~/Downloads' | |
alias s='cd ~/Sites' | |
# Servers: |
OlderNewer