Skip to content

Instantly share code, notes, and snippets.

@rust-play
rust-play / playground.rs
Created Oct 17, 2019
Code shared from the Rust Playground
View playground.rs
fn main() {
let y = {
let x = 3;
x + 1
};
assert_eq!(y, 4);
}
View imports.ts
import { useData } from "./data";
import { useActions } from "./actions";
View index.php
<?php
require_once 'connec.php';
try {
$pdo = new \PDO(DSN, USER, PASS);
} catch (PDOException $e) {
echo 'Connexion échouée : ' . $e->getMessage();
}
@rust-play
rust-play / playground.rs
Created Oct 17, 2019
Code shared from the Rust Playground
View playground.rs
fn main() {
let s = String::from("World");
let s2 = foo(s);
println!("{}", s);
}
fn foo(s: String) -> String {
let mut s1 = String::from(", Hello!");
s1.push_str(s.as_str());
s1
@rust-play
rust-play / playground.rs
Created Oct 17, 2019
Code shared from the Rust Playground
View playground.rs
fn main() {
let s = String::from("World");
let s2 = foo(s);
println!("{}", s);
}
fn foo(s: String) -> String {
let mut s1 = String::from(", Hello!");
s1.push_str(s.as_str());
s1
View ClassicURL.cmp
<aura:component implements="flexipage:availableForAllPageTypes,force:hasRecordId,force:hasSObjectName" access="global">
<aura:attribute name="sObjectName" type="String" />
<aura:attribute name="url" type="String"/>
<aura:attribute name="hostName" type="String" />
<aura:attribute name="showOpenButton" type="Boolean"/>
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<aura:attribute name="urlClassic" type="String" default="{!v.url+v.recordId}" />
<br/>
<div align="center">
<aura:if isTrue = "{!v.showOpenButton}">
View actions.ts
import { actionsProxy, memo } from "@prodo/core";
import { db, state, auth } from "./data";
import { newId } from "./effects"
function setRoom(id: string) {
state.roomId = id;
}
function likeMessage(id: string) {
db.messages[id].likes++;
}
@choco-bot
choco-bot / FilesSnapshot.xml
Created Oct 17, 2019
tinypdf v3.00.3200 - Failed - Package Tests Results
View FilesSnapshot.xml
<?xml version="1.0" encoding="utf-8"?>
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<files>
<file path="C:\ProgramData\chocolatey\lib\tinypdf\tinypdf.nupkg" checksum="6A418D013FE4D4578D24507329B8129A" />
<file path="C:\ProgramData\chocolatey\lib\tinypdf\tinypdf.nuspec" checksum="65726427488A7F835C87211ED991874E" />
<file path="C:\ProgramData\chocolatey\lib\tinypdf\tools\chocolateyInstall.ps1" checksum="4C88310B7CCBFAAA50DEAC69E620F001" />
</files>
</fileSnapshot>
@rms1000watt
rms1000watt / delete-rc-tags-in-git-repos.sh
Created Oct 17, 2019
Delete RC Tags in Git/Github Repos
View delete-rc-tags-in-git-repos.sh
#!/usr/bin/env bash
git fetch --tags --all
for tag in $(git tag -l); do
if ! echo "${tag}" | grep -q "\-rc"; then
continue
fi
echo
@jdhuntx
jdhuntx / dockershell
Created Oct 17, 2019
Docker shell shortcut
View dockershell
# docker exec
function ds() {
docker exec -it "${1}" bash
}
You can’t perform that action at this time.