Skip to content

Instantly share code, notes, and snippets.

View shadowfacts's full-sized avatar
🖕
stop turning github into a social network, micro$oft

Shadowfacts shadowfacts

🖕
stop turning github into a social network, micro$oft
View GitHub Profile
//
// ContentView.swift
// HSplitView
//
// Created by Shadowfacts on 4/16/24.
//
import SwiftUI
struct ContentView: View {
struct ContentView: View {
@State var model = Model()
var body: some View {
let _ = Self._printChanges()
VStack {
Text(model.test)
Text("\(model.otherThing)")
Button("Toggle") {
// Normal position: fixed;
const elems = document.getElementsByTagName("*");
for (let i = 0; i < elems.length; i++) {
const el = elems[i];
const position = window.getComputedStyle(el).getPropertyValue("position");
if (position == "fixed") {
el.remove();
}
}
#!/bin/bash
# Requirements: imagemagick
# Usage: ./reverse.sh <repetitions>
cp orig.png new.png
for i in `seq 1 $1`
do
echo "Iteration: $i"
composite -geometry 125x171+502+280 new.png new.png new.png
//
// SimpleScrollingStack.swift
// A super-simple demo of a scrolling UIStackView in iOS 9
//
// Created by Paul Hudson on 10/06/2015.
// Learn Swift at www.hackingwithswift.com
// @twostraws
//
import UIKit
https://eth.nanopool.org/account/0xe59492edf924980df3b8b8aa6a85a5c2f7013edc/JRTI
@shadowfacts
shadowfacts / 7.java
Created July 17, 2015 23:32
Java 8 lambda example
Runnable thingy = new Runnable() {
public void run() {
System.out.println("Annonymous class");
}
}
somethingElse(thingy);
@shadowfacts
shadowfacts / konami.js
Created April 15, 2015 01:32
jQuery Konami code detector
/*!
* SimpleKonami
* Copyright: WTFPL
* Version: 1
* Requires: jQuery v1.3.2 or later
*/
//Set up our array of needed keys, and variables.
neededkeys = [38,38,40,40,37,39,37,39,66,65], started = false, count = 0;
$(document).keydown(function(e){
@shadowfacts
shadowfacts / index.coffee
Last active February 5, 2017 22:55
Ubersicht widget and Node.js script for a desktop GitHub contributions widget. Example here: http://imgur.com/4WeelK5
command: "curl -s https://github.com/shadowfacts | /Users/shadowfacts/.nvm/versions/node/v7.5.0/bin/node /Users/shadowfacts/Dev/gh-activity/process.js"
refreshFrequency: 3600000
style: """
#canvas {
position: absolute;
left: 50%;
top: 50%;
transform: translateX(-50%) translateY(-50%);

Keybase proof

I hereby claim:

  • I am shadowfacts on github.
  • I am shadowfacts (https://keybase.io/shadowfacts) on keybase.
  • I have a public key ASBZTmn2w4UimvtNBvdAN8C_rKi2YZXM7uC98zzX-BLGcgo

To claim this, I am signing this object: