Skip to content

Instantly share code, notes, and snippets.

@kimat
kimat / out
Created August 21, 2024 08:38
nixpkgs-review pr 215167
nixpkgs-review pr 215167
$ git -c fetch.prune=false fetch --no-tags --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0 pull/215167/head:refs/nixpkgs-review/1
remote: Enumerating objects: 41, done.
remote: Counting objects: 100% (41/41), done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 41 (delta 24), reused 35 (delta 24), pack-reused 0 (from 0)
Unpacking objects: 100% (41/41), 296.73 KiB | 3.37 MiB/s, done.
From https://github.com/NixOS/nixpkgs
* [new branch] master -> refs/nixpkgs-review/0
* [new ref] refs/pull/215167/head -> refs/nixpkgs-review/1
@kimat
kimat / requesttest.rb
Created June 16, 2023 13:47 — forked from justinwoo/requesttest.rb
simple HTTP request testing using net/http and a JSON POST payload | Update: I guess I might start updating this again. I am pretty fickle.
#! usr/bin/ruby
require 'uri'
require 'net/http'
require 'json'
def getRequest(url)
uri = URI.parse(url)
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Get.new(uri.request_uri)
request["Accept"] = "application/json"
set searchurls.github https://github.com/search?o=desc&q=%s&ref=simplesearch&type=Repositories
bind lG fillcmdline tabopen github
set searchurls.googleluckygithub https://www.google.com/search?hl=en&q=github+%s&btnI=Im+Feeling+Lucky
bind lg fillcmdline tabopen googleluckygithub
set searchurls.youtube https://www.youtube.com/results?search_query=%s
bind ly fillcmdline tabopen youtube
set searchurls.googlelucky https://www.google.com/search?hl=en&q=%s&btnI=Im+Feeling+Lucky
bind ll fillcmdline tabopen googlelucky
@kimat
kimat / index.html
Last active July 29, 2022 16:04
xbps-query -Rs '*' | sed 's/^.\{4\}//g'
This file has been truncated, but you can view the full file.
<html>
<body>
<script src="./index.js"></script>
<h1>void packages</h1>
<pre>
<!-- xbps-query -Rs '*' | sed 's/^.\{4\}//g' -->
2048-qt-0.1.6_1 The 2048 game implemented in Qt
2bwm-0.2_1 Fast floating window manager
3proxy-0.8.12_1 3proxy tiny proxy server
64tass-1.53.1515_2 A 6502/6510 assembler
@kimat
kimat / void-packages
Last active May 10, 2022 04:50
xbps-query -Rs '*' | awk '{$1="";print}'
2048-qt-0.1.6_1 The 2048 game implemented in Qt
2bwm-0.2_1 Fast floating window manager
3proxy-0.8.12_1 3proxy tiny proxy server
64tass-1.53.1515_2 A 6502/6510 assembler
6tunnel-0.12_1 IPv6 hosts with IPv4-only applications and vice-versa
9base-6.0.20170806_1 Revived minimalist port of Plan 9 userland to Unix
9menu-1.9_2 lightweight menu for X11
9mount-1.3_2 A set of SUID tools for mounting 9p filesystems via v9fs
ADMS-qucs-2.3.6_1 Automatic Device Model Synthesizer (Qucs fork)
Adapta-3.93.1.16_1 An adaptive Gtk+ theme based on Material Design Guidelines

minishift

prerequisite backup or remove

rm -rf ~/.minishift
rm -rf ~/.helm
rm -rf ~/.kubectl

start minishift with correct addons

# colors
export RESET="\e[0m"
export BOLD="\e[1m"
export BLUE="\e[34m"
export BLACK="\e[30m"
export RED="\e[31m"
export GREEN="\e[32m"
export YELLOW="\e[33m"
export BLUE="\e[34m"
function onSuccess(contacts) {
alert('Found ' + navigator.contacts.length + ' navigator.contacts.');
};
function onError(contactError) {
alert('onError!');
};
// find all contacts with 'Bob' in any name field
var options = new ContactFindOptions();
# placer vous dans votre dossier
cd votreprojet
# python 2.7
python -m SimpleHTTPServer
# python 3 +
python3 -m http.server
// create a dictionary
var dictionary = { "key1" : "val2" };
// cast to string
var dictionary_string = JSON.stringify(dictionary);
// save in local storage
localStorage.setItem("my",dictionary_string);
// read back from local storage