Skip to content

Instantly share code, notes, and snippets.

View daniel-vera-g's full-sized avatar
💭
Present

Daniel VG daniel-vera-g

💭
Present
View GitHub Profile
@rauchg
rauchg / p.sh
Last active March 12, 2024 04:28
Perplexity CLI in pure shell
#!/usr/bin/env bash
function p() {
jq -n \
--arg content "$*" \
'{
"model": "pplx-7b-online",
"messages": [
{
"role": "system",
"content": "Be precise and concise."
@prologic
prologic / LearnGoIn5mins.md
Last active April 22, 2024 13:28
Learn Go in ~5mins
@marco79cgn
marco79cgn / dm-toilet-paper.js
Last active February 29, 2024 17:35
iOS Widget, das die Anzahl an Klopapier Packungen in deiner nächsten dm Drogerie anzeigt (für die scriptable.app)
// dm Klopapier Widget
//
// Copyright (C) 2020 by marco79 <marco79cgn@gmail.com>
//
// Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
// IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
@sashko
sashko / _flutter
Created May 9, 2018 14:51
Google Flutter autocompletion plugin for Oh My Zsh
#compdef flutter
#autoload
# in order to make this work, you will need to have Flutter installed
#
# flutter zsh completion, based on adb completion
local -a _1st_arguments
_1st_arguments=(
'analyze:Analyze the project''s Dart code'
@azs06
azs06 / jugglingAsync.js
Created August 28, 2016 15:29
Learnyounode juggling async solution using es6 promises
const http = require('http');
const urls = process.argv.slice(2, process.argv.length);
let fetchData = function(url){
return new Promise(function(resolve, reject) {
http.get(url, (res)=>{
let data = '';
res.setEncoding('utf8');
//res.resume();
res.on('data',(chunk)=>{
@russelldb
russelldb / tmux.md
Last active October 18, 2023 14:48 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@willurd
willurd / web-servers.md
Last active April 23, 2024 23:07
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 24, 2024 12:19
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@sindresorhus
sindresorhus / simplexhr.js
Created January 9, 2012 15:19
Simple XMLHttpRequest wrapper
var xhr = function() {
var xhr = new XMLHttpRequest();
return function( method, url, callback ) {
xhr.onreadystatechange = function() {
if ( xhr.readyState === 4 ) {
callback( xhr.responseText );
}
};
xhr.open( method, url );
xhr.send();