Skip to content

Instantly share code, notes, and snippets.

View Cryptoc1's full-sized avatar
:shipit:

Samuel Steele Cryptoc1

:shipit:
View GitHub Profile
@Cryptoc1
Cryptoc1 / PixelSort.csx
Created December 31, 2022 18:27
C# implementation of @kimasendorf's ASDFPixelSort algorithm using Magick.NET
#!/usr/bin/env dotnet-script
#r "nuget: Magick.NET-Q8-AnyCPU, 12.2.2"
using ImageMagick;
using( var image = new MagickImage( Path.GetFullPath( @".\source.jpg" ) ) )
{
Console.WriteLine( "loaded, starting sort." );
PixelSorter.Sort( image, new PixelSortMode.White() );
@avillp
avillp / Unportify-v1.4.3.js
Last active November 12, 2023 15:22
Unportify helps you export your Google Play Music playlists.
/*
Unportify is a script that exports your Google Play music to text.
Copyright (C) 2016 Arnau Villoslada
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@dchowitz
dchowitz / es6-debugging-in-vscode.md
Last active August 30, 2023 06:23
Debugging ES6 in VS Code

Debugging ES6 in VS Code

My current editor of choice for all things related to Javascript and Node is VS Code, which I highly recommend. The other day I needed to hunt down a bug in one of my tests written in ES6, which at time of writing is not fully supported in Node. Shortly after, I found myself down the rabbit hole of debugging in VS Code and realized this isn't as straightforward as I thought initially. This short post summarizes the steps I took to make debugging ES6 in VS Code frictionless.

What doesn't work

My first approach was a launch configuration in launch.json mimicking tape -r babel-register ./path/to/testfile.js with babel configured to create inline sourcemaps in my package.json. The debugging started but breakpoints and stepping through the code in VS Code were a complete mess. Apparently, ad-hoc transpilation via babel-require-hook and inline sourcemaps do not work in VS Code. The same result for attaching (instead of launch) to `babel-node

@CTurt
CTurt / gist:27fe7f3c241f69be19e5
Created December 14, 2015 19:24
PS4 kernel exploit tease (root FS dump, and list of PIDs)
[+] Entered shellcode
[+] UID: 0, GID: 0
[DIR]: .
[DIR]: ..
[DIR]: adm
[DIR]: app_tmp
[DIR]: data
[DIR]: dev
[DIR]: eap_user
[DIR]: eap_vsh
@JadenGeller
JadenGeller / NSDate Emoji Clock.swift
Created August 23, 2015 05:59
Emoji Clock from NSDate 🕛
extension NSDate {
var emojiDescription: Character {
let components = NSCalendar.currentCalendar().components(.CalendarUnitHour | .CalendarUnitMinute, fromDate: self)
let clockHour = components.hour % 12
let isSecondHalfOfHour = components.minute >= 15 && components.minute < 45
switch (clockHour, isSecondHalfOfHour) {
case (0, false): return "🕛"
case (0, true): return "🕧"
@mattdesl
mattdesl / gist:10218005
Created April 9, 2014 01:45
pseudo-code for perlin-noise based generative impressionist paintings
render
for each particle
x, y = particle.position
color = sample( colorMap, x, y )
noise = sample( noiseMap, x, y )
angle = noise * PI * 2
particle.velocity.add( cos(angle), sin(angle) )
@rui314
rui314 / gist:2018964
Created March 12, 2012 00:51
N queen
int print_board(int board[][8]) {
for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++) {
if (board[i][j])
printf("Q ");
else
printf(". ");
}
printf("\n");
}