Skip to content

Instantly share code, notes, and snippets.

View TheOnlyArtz's full-sized avatar
:shipit:
Well Crystal is lit.

Amit Katz TheOnlyArtz

:shipit:
Well Crystal is lit.
View GitHub Profile
use std::{process::{Command , Stdio}, time::{Duration, Instant}};
#[cfg(target_os = "windows")]
use std::os::windows::process::CommandExt;
fn main() {
let mut child = Command::new("cmd")
.args(["/c", "schtasks"])
.creation_flags(0x08000000)
.stdout(Stdio::piped())
.spawn()
@TheOnlyArtz
TheOnlyArtz / cargo.toml
Last active July 20, 2021 18:28
A small Rust program which is meant to run via the Task Scheduler in order to unidle your computer, the origin of it was to keep the Discord's Spotify RPC server alive so the `Listening to Spotify` will be available when I'm listening from whatever device while not being home.
[package]
name = "spotify_unidler"
version = "0.1.0"
authors = ["TheOnlyArtz <callcraft456@gmail.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
winapi = {version = "*", features = ["winuser"]}
<?
// create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "https://8519f0b2a381cbd6031d04f1f7934335.m.pipedream.net");
curl_setopt($ch, CURLOPT_HEADER, 0);
// grab URL and pass it to the browser
curl_exec($ch);
Padding(
padding: const EdgeInsets.only(top: 55.0, right: 45.0),
child: Row(
children: <Widget>[
RichText(
text: TextSpan(
style: TextStyle(
fontSize: 30,
color: Theme.of(context).textSelectionColor,
letterSpacing: 0.1),
using Flux
using Flux: @epochs
using BSON: @save
using BSON: @load
using Random
# using Flux
print("Running!")
Random.seed!(1234);
# TODO: Write documentation for `Bencodecr`
module Bencodecr
VERSION = "0.1.0"
enum States
STATE_NULL,
STATE_INT,
STATE_STR_LEN,
STATE_STR_CONTENT,
STATE_LIST,
require "./CpuTypes.cr"
abstract struct Cybergarden::Items::Cpu
property price : Int32
property power : Int32
property mps : Int32 # money per second
property type : Int32
def initialize()
@price = 0
@power = 0
Widget _buildFlowerCardList() {
return Row(
children: <Widget>[
Expanded(
flex: 42,
child: ListView(
children: <Widget>[
Padding(
padding: EdgeInsets.only(right: 30),
child: _buildFlowerCard("Alaskan", "Thunderfuck Strain", 300, 0xff4A878E, 0xff4F848F, 0xff6BA396),
Widget _buildFlowerCardList() {
return Row(
children: <Widget>[
Expanded(
flex: 42,
child: ListView(
children: <Widget>[
Padding(
padding: EdgeInsets.only(right: 30),
child: _buildFlowerCard("Alaskan", "Thunderfuck Strain", 300, 0xff4A878E, 0xff4F848F, 0xff6BA396),
@override
Widget build(BuildContext context) {
var width = MediaQuery.of(context).size.width;
var height = MediaQuery.of(context).size.height;
// return LayoutBuilder(
// builder: (context, constrainets) {
// print(constrainets.maxHeight);
// return Container();
// },
// );