This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//calculate | |
void util_heltall::beregn_data(){ | |
antall_enere=0; | |
lengde=0; | |
pos_max_signifikant=0; | |
//calculate length of number | |
unsigned long long i = heltall; | |
while (i > 0){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://datakurre.pandala.org/2015/10/nix-for-python-developers.html | |
with import <nixpkgs> {}; | |
stdenv.mkDerivation rec { | |
name = "env"; | |
# Mandatory boilerplate for buildable env | |
env = buildEnv { name = name; paths = buildInputs; }; | |
builder = builtins.toFile "builder.sh" '' | |
source $stdenv/setup; ln -s $env $out | |
''; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; ... | |
;;; ... | |
;; List of additional packages that will be installed without being | |
;; wrapped in a layer. If you need some configuration for these | |
;; packages, then consider creating a layer. You can also put the | |
;; configuration in `dotspacemacs/user-config'. | |
;; Cabal/Nix haskell setup | |
dotspacemacs-additional-packages '(dante nix-sandbox) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
(setxkbmap -query | grep -q "layout:\s\+us") && setxkbmap no || setxkbmap us |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ANT000000 | Antiques & Collectibles / General | |
---|---|---|
ANT001000 | Antiques & Collectibles / Americana | |
ANT002000 | Antiques & Collectibles / Art | |
ANT003000 | Antiques & Collectibles / Autographs | |
ANT005000 | Antiques & Collectibles / Books | |
ANT006000 | Antiques & Collectibles / Bottles | |
ANT007000 | Antiques & Collectibles / Buttons & Pins | |
ANT008000 | Antiques & Collectibles / Care & Restoration | |
ANT009000 | Antiques & Collectibles / Transportation | |
ANT010000 | Antiques & Collectibles / Clocks & Watches |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
## PARTITION DISKS | |
################## | |
# zap-all and clear partition table | |
sgdisk -Z /dev/sda && sgdisk -o /dev/sda | |
# create bios_grub partition | |
sgdisk -n 1::+8M -t 1:ef02 /dev/sda | |
# create boot partition | |
sgdisk -n 2::+512M -t 2:8300 /dev/sda |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use "collections" | |
primitive Day01 | |
fun val test_input(): String => "199\n200\n208\n210\n200\n207\n240\n269\n260\n263\n" | |
fun solve_part1(input: String): USize => | |
let depths = _parse_entries(input) | |
var last_depth: USize = 0 | |
// hack because the first will always be an increase | |
var incs: USize = -1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "matching_brackets.h" | |
#include <string.h> | |
struct Stack { | |
int top; | |
char data[20]; | |
}; | |
void push(struct Stack *s, char elem) { | |
s->top++; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Locking from: https://gist.github.com/jpclipffel/0b8f470be029fc9e3f07 | |
# Run two bash commands in sequence using flock to prevent | |
# from running multiple instances in paralell | |
# ./sequenced.sh -g echo 'Hello' > test.txt -t cat test.txt -n lock_name | |
while getopts 1:2:n: flag; do | |
case "${flag}" in | |
1) FIRST_CMD=${OPTARG} ;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ npm i | |
npm WARN deprecated [email protected]: Use your platform's native performance.now() and performance.timeOrigin. | |
npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead | |
npm WARN deprecated [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility | |
npm WARN deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x. | |
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser | |
npm WARN deprecated @types/[email protected]: This is a stub types definition. testing-library__react provides its own type definitions, so you do not need this installed. | |
added 1725 packages, and audited 1726 packages in 20s |
OlderNewer