Skip to content

Instantly share code, notes, and snippets.

View elrikdante's full-sized avatar

Dante Haskell Elrik elrikdante

View GitHub Profile
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
import Control.Applicative
import Control.Comonad
import Control.Monad
import Data.Functor.Compose
import Data.Functor.Contravariant
import qualified Data.Functor.Contravariant.Day as Contravariant
require 'minitest/autorun'
class X < Minitest::Test
def make_lambda b
->(z) { b[:finalize] = true }
end
def test_finalizer
hash = {}
make_finalizer = ->() {
require 'objspace'
require 'config/environment'
require 'fiddle'
require 'fiddle/import'
extend Fiddle::Importer
include Fiddle
dlload
typealias "VALUE", "unsigned long"
@cwilhit
cwilhit / DockerScrape.ps1
Last active June 2, 2021 17:46
Scrapes over dockerhub, grabbing the pull counts of all images, the last time "latest" tag was updated, and gets the associated "FROM" image for each container.
#########################################################################################
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
#########################################################################################
Microsoft.PowerShell.Core\Set-StrictMode -Version Latest
#region variables
#!/usr/bin/env stack
-- stack --stack-yaml ./stack.yaml runghc
-- SIGINT CTF 2013: baremetal
-- http://shell-storm.org/repo/CTF/SIGINT-2013/pwning/baremetal-100/
{-# LANGUAGE OverloadedStrings #-}
import Control.Concurrent (threadDelay)
import Control.Monad
---
title: "Bug DLL"
author: "Stéphane Laurent"
date: "10 octobre 2017"
output: html_document
editor_options:
chunk_output_type: console
---
```{r setup, include=FALSE}
@stla
stla / Lib.hs
Last active October 13, 2017 10:03
Haskell FFI examples
{-# LANGUAGE ForeignFunctionInterface #-}
module Lib where
import Foreign.C.Types
import Foreign (peek, newForeignPtr_)
import Foreign.Ptr
import System.IO.Unsafe (unsafePerformIO)
import qualified Data.Vector.Storable as SV
@yasinkuyu
yasinkuyu / desiredcapabilities.py
Created September 8, 2017 14:07
Python Selenium Luminati Proxy Desired Capabilities (Exclude localhost)
#@yasinkuyu 08/09/2017
# install luminati (https://luminati.io) proxy manager & run
from selenium import webdriver
from selenium.webdriver.common.proxy import Proxy, ProxyType
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.proxy import *
PROXY = '127.0.0.1:24000'
@pvanliefland
pvanliefland / coucou.py
Last active April 25, 2018 20:11
My Ludus Gist
def yell(name):
print ("HEY %s" % name.upper())
@Miouyouyou
Miouyouyou / drm-prime-dumb-kms.c
Last active October 25, 2024 06:17
Simple example showing how to use DRM to : allocate a Dumb buffer on the GPU, use it as a framebuffer, use this CRTC on the currently connected screen (expecting 1 connected screen), export the buffer, reimport it implicitly with mmap and write in it.
// This will works on Embedded GPU that implements .gem_prime_mmap like Rockchip ones.
// This will fail on most DRM drivers for GPU with dedicated memory as they tend to NOT implement .gem_prime_mmap.
#include <stdio.h>
#include <libdrm/drm.h>
#include <stdint.h>
#include <sys/mman.h>
#include <string.h>