command | from | powershell | powershell abbreviated |
---|---|---|---|
rmdir /q /s c:\folder |
cmd.exe |
Remove-Item -Recurse -Force c:\folder |
rm -r -fo c:\folder |
find . -name '*wildcard*' |
bash |
Get-ChildItem -Path . -Include '*wildcard*' |
gci . -inc '*wildcard*' |
ls -lart |
bash |
Get-ChildItem | Sort-Object LastWriteTime |
ls | sort LastWriteTime |
dir /o:d |
cmd.exe |
Get-ChildItem | Sort-Object LastWriteTime |
ls | sort LastWriteTime |
ls -larS |
bash |
Get-ChildItem | Sort-Object Length |
ls | sort Length |
dir /o:s |
cmd.exe |
Get-ChildItem | Sort-Object Length |
ls | sort Length |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'openssl' | |
# https://ruby.github.io/openssl/OpenSSL.html | |
puts "OpenSSL::OPENSSL_FIPS = #{OpenSSL::OPENSSL_FIPS}" | |
puts "\t-> Boolean indicating whether OpenSSL is FIPS-capable or not" | |
# try to turn on fips_mode if it is marked as true | |
if OpenSSL::OPENSSL_FIPS | |
puts "-> Setting fips_mode to true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Inspired by https://www.youtube.com/watch?v=MHBG_R_dhwk | |
#include <stdio.h> | |
int main() { | |
char input_line[80]; | |
long line_count = 0; | |
while(!feof(stdin)) { | |
fgets(input_line, 80, stdin); | |
if(!feof(stdin)) line_count++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'openssl' | |
curve='prime256v1' | |
p ::OpenSSL::PKey::EC.new(curve).generate_key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env osascript | |
# https://chrispennington.blog/blog/send-imessage-with-applescript/ | |
on run parameters | |
# the number here is the number of seconds | |
set theDelay to 3 | |
# Verify if this can use display names | |
set phoneNumber to "+1 (555) 555-1212" | |
tell application "Messages" | |
set targetBuddy to phoneNumber |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle list 2>&1 | sed 's/^ \* \(.*\) (.*)/\1/' | grep -v 'bundle info' | grep -v 'bundle:' | xargs -I {} bundle info {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Keyboard.h> | |
#include <Mouse.h> | |
#include <LiquidCrystal.h> | |
/* | |
Arduino 2x16 LCD - Detect Buttons | |
modified on 18 Feb 2019 | |
by Saeed Hosseini @ Electropeak | |
https://electropeak.com/learn/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Mouse.h> | |
void blinkIfYoureRebooted() { | |
// 200, 400, 600, 800, 1000ms blinks | |
for(int i=1; i<=5; i++) { | |
digitalWrite(LED_BUILTIN, HIGH); | |
delay(200 * i); | |
digitalWrite(LED_BUILTIN, LOW); | |
delay(200 * i); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'time' | |
require 'tzinfo' | |
require 'colorize' | |
def usage | |
puts %q( | |
usage: | |
convert_times {time string to parse, spaces ok} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- wp:code --> | |
<pre class="wp-block-code"><code> | |
select list.i, | |
substring_index(substring_index( | |
substring_index( | |
substring_index( | |
'9977034 | e9e82737-db8f-44c0-985b-d004788aa91d | 208 | |
3393402 | aa1cbfe0-a66d-44ac-9b66-bd2369c96e52 | 136 | |
3524174 | 490dbaa0-faed-4773-b3c0-4c979e1b07cb | 250 |
NewerOlder