Skip to content

Instantly share code, notes, and snippets.

Avatar

Peter Hamberg Zazcallabah

View GitHub Profile
@Zazcallabah
Zazcallabah / malloc.c
Created Dec 1, 2021
2006-12-07 2g1520 OS
View malloc.c
#include <stdio.h>
#include <unistd.h>
#include "malloc.h"
#define err(X,Y) (_err((X),(Y),(__LINE__)))
void ___msg(){}
View 360vid.md

Promenadvideoklubben

Observationer om Insta360 ONE X

linser

Håll linserna rengjorda. Undvik fingeravtryck. Putsduk och rengöringsvätska finns hos alla optiker.

filstorlek

74 GB free space gives you ~100 minutes of video. Meaning you can get about 160 minutes of video onto an empty 128GB card.

View gist:e401d307d160a8b6decba093f0219a23
www.youtube.com##[is-watch-page] #page-manager:style(margin-top:0px !important)
www.youtube.com###container.ytd-masthead:style(height:32px !important)
www.youtube.com###search:style(line-height:16px !important)
www.youtube.com##ytd-watch-flexy[theater] #player-theater-container:style(max-height:calc(100vh - 40px) !important)
www.youtube.com##ytd-watch-flexy[theater] #player-theater-container:style(margin-top:32px !important)
www.youtube.com##ytd-watch-flexy[fullscreen] #player-theater-container:style(max-height:100vh !important)
www.youtube.com##ytd-watch-flexy[fullscreen] #player-theater-container:style(margin-top:0px !important)
View fikagruppsgenerator.html
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<meta charset="utf-8" />
<title>Fikagruppsgenerator</title>
<style>
body { padding:1em }
h2 { margin-top:2em }
View t.user.js
// ==UserScript==
// @name t
// @version 0.1
// @grant none
// @run-at document-end
// ==/UserScript==
window.addEventListener ("load", pageFullyLoaded);
@Zazcallabah
Zazcallabah / sudokuSolve.user.js
Last active Feb 29, 2020
sudoku solver for websudoku
View sudokuSolve.user.js
// ==UserScript==
// @name Sudokusolve
// @version 0.1
// @match https://nine.websudoku.com/*
// @grant none
// ==/UserScript==
(function () {
function cplxReduce(input, groupix) {
for (var i = 0; i < 8; i++) {
@Zazcallabah
Zazcallabah / edge.ps1
Last active Feb 24, 2020
Akamai EdgeGrid Signature for use as an Octopus build step template
View edge.ps1
$RestMethod = "#{RestMethod}"
$AkamaiSecret = "#{AkamaiSecret}"
$AkamaiUri = "#{AkamaiUri}"
$AkamaiObjects = "#{AkamaiObjects}"
$AkamaiClientToken = "#{AkamaiClientToken}"
$AkamaiClientAccessToken = "#{AkamaiClientAccessToken}"
[System.Net.ServicePointManager]::Expect100Continue = $false
View Microsoft.PowerShell_profile.ps1
set-alias -name ls -value Get-ChildItem
set-alias -name sc -value Set-Content
$culture = [CultureInfo]::InvariantCulture.Clone()
$currentThread = [System.Threading.Thread]::CurrentThread
$culture.DateTimeFormat.DateSeparator = "-"
$culture.DateTimeFormat.FirstDayOfWeek = "Monday"
$culture.DateTimeFormat.ShortDatePattern = "yyyy-MM-dd"
$currentThread.CurrentCulture = $culture
$currentThread.CurrentUICulture = $culture
@Zazcallabah
Zazcallabah / proget-image-sizes.ps1
Last active Feb 10, 2020
Get docker repository file size info from proget, grouped by package
View proget-image-sizes.ps1
$key = "<key with native api access>"
$uribase="http://<proget server>/api/json/"
$feedid = <feed id>
$packages = Invoke-webrequest "$($uribase)DockerImages_GetRepositories?key=$($key)&Feed_ID=$feedid" | select -expandproperty Content | convertfrom-json
$size_lookup = @{}
$data = @()
$total = $packages.length
@Zazcallabah
Zazcallabah / nifty-chat.user.js
Last active May 26, 2020
I cut apart the nifty chat monitor script to make it only do inline images, and to also do them on vods.
View nifty-chat.user.js
// ==UserScript==
// @name Nifty Chat Monitor
// @namespace http://somewhatnifty.com
// @description reformats twitch chat for display on a chat monitor
// @match https://www.twitch.tv/*
// @version 0.4
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js
// @grant GM_getResourceText
// @grant GM_addStyle
// @require https://raw.githubusercontent.com/sizzlemctwizzle/GM_config/master/gm_config.js