Skip to content

Instantly share code, notes, and snippets.

@rust-play
rust-play / playground.rs
Created Mar 20, 2019
Code shared from the Rust Playground
View playground.rs
fn main() {
let mut array: [String; 7] = Default::default();
attempt(&mut array);
println!("{:?}", array);
}
fn attempt(array: &mut [String]){
let a = "amit".to_string();
array[0] = a;
@Jmacklin308
Jmacklin308 / cloudSettings
Created Mar 20, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2019-03-20T03:11:25.167Z","extensionVersion":"v3.2.7"}
View re-basics.md

Notes


.       - Any Character Except New Line
\d      - Digit (0-9)
\D      - Not a Digit (0-9)
\w      - Word Character (a-z, A-Z, 0-9, _)
\W      - Not a Word Character
\s      - Whitespace (space, tab, newline)
@rust-play
rust-play / playground.rs
Created Mar 20, 2019
Code shared from the Rust Playground
View playground.rs
fn main() {
let mut array: [String; 7] = Default::default();
attempt(&mut array);
println!("{:?}", array);
}
fn attempt(array: &mut [String]){
let a = "amit".to_string();
array[0] = a;
View start_work.sh
#!/bin/bash
export GITHUB_REPO="user/repo"
export GITHUB_USERNAME=$(cat ~/.githubrc 2> /dev/null | grep user.login | cut -d ":" -f2 | xargs)
export GITHUB_PASSWORD=$(cat ~/.githubrc 2> /dev/null | grep user.password | cut -d ":" -f2 | xargs)
if [ -z "$GITHUB_USERNAME" ]
then
read -p "Type your Github username: " GITHUB_USERNAME
echo "user.login: $GITHUB_USERNAME" >> ~/.githubrc
fi
@faridalrafi
faridalrafi / app.js
Created Mar 20, 2019
Express error handler example
View app.js
const createError = require('http-errors');
.........
// catch 404 and forward to error handler
app.use((req, res, next) => {
next(createError(404));
});
// error handler
app.use((err, req, res, next) => {
// set locals, only providing error in development
res.locals.message = err.message;
@rust-play
rust-play / playground.rs
Created Mar 20, 2019
Code shared from the Rust Playground
View playground.rs
fn main() {
let mut array: [String; 7] = Default::default();
attempt(&mut array);
println!("{:?}", array);
}
fn attempt(array: &mut [String]){
let a = "amit".to_string();
array[0] = a;
@nolanlawson
nolanlawson / index.html
Created Mar 20, 2019
Repro Firefox scroll bug
View index.html
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta id="theThemeColor" name="theme-color" content="#4169e1">
<meta name="description" content="An alternative web client for Mastodon, focused on speed and simplicity.">
<base href="/">
<link id="theManifest" rel="manifest" href="/manifest.json">
<link id="theFavicon" rel="icon" type="image/png" href="/favicon.png">
View gist:589d28e4c4e290012b89dff8219a1699
Input : Period1(5);
var : Sma1(0);
Sma1 = ma(C,Period1);
Plot1(Sma1, "이동평균1");it
@ato-s
ato-s / index.html
Created Mar 20, 2019
movie responsive
View index.html
<div class="thumb"> <iframe id="player" type="text/html" src="https://www.youtube.com/embed/cNTVl_lQONc?rel=0" frameborder="0"></iframe> </div>
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.