Skip to content

Instantly share code, notes, and snippets.

View abnerCrack's full-sized avatar
🏠
Working.

C abnerCrack

🏠
Working.
View GitHub Profile
@rust-play
rust-play / playground.rs
Created April 3, 2018 08:34
Code shared from the Rust Playground
extern crate openssl;
use openssl::rsa::Rsa;
use openssl::pkey::PKey;
use std::str;
use openssl::x509::{X509, X509Name};
use openssl::hash::MessageDigest;
use openssl::nid::Nid;
fn main() {
@jakewtaylor
jakewtaylor / usage.jsx
Last active August 31, 2022 18:21
useStyles() React Hook
import React from 'react';
import { useStyles } from '../hooks/useStyles';
export const Sidebar = ({ colourful = false }) => {
const styles = useStyles(stylesheet);
return (
<div className={styles.sidebar}>
<p
className={styles.compose(
git_current_branch () {
local ref
ref=$(command git symbolic-ref --quiet HEAD 2> /dev/null)
local ret=$?
if [[ $ret != 0 ]]
then
[[ $ret == 128 ]] && return
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return
fi
echo ${ref#refs/heads/}