Make sure you have installed the following commands:
- swaymsg
- jq
- slurp
- awk
| #include <stdio.h> | |
| int main(void){ | |
| char name[L_tmpnam]; | |
| if(tmpnam(name) == NULL){ | |
| printf("Temporary file name: %s\n", name); | |
| return 0; | |
| } |
| # Run Powershell scriptblock as Trusted Installer From Admin context (Yeah, MDT) using Scheduled Task. | |
| # Credit due to : https://www.tiraniddo.dev/2019/09/the-art-of-becoming-trustedinstaller.html | |
| $ScriptBlock = { | |
| $Script:TsEnv = New-Object PSObject | |
| $Script:TsEnv|Add-Member -MemberType NoteProperty -Name 'SystemHostName' -Value ([System.Environment]::MachineName) | |
| $Script:TsEnv|Add-Member -MemberType NoteProperty -Name 'SystemIPAddress' -Value (Get-NetIPAddress -AddressFamily IPv4 -PrefixOrigin Dhcp -AddressState Preferred).IPAddress | |
| $Script:TsEnv|Add-Member -MemberType NoteProperty -Name 'SystemOSversion' -Value ([System.Environment]::OSVersion.VersionString) |
| busctl --system set-property org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager ConnectivityCheckEnabled "b" 0 |
I am passionate about Ruby, but its execution time compared to other languages is extremely high, especially when we want to use more complex algorithms. In general, data structures in interpreted languages become incredibly slow compared to compiled languages. Some algorithms such as ´n-body´ and ´fannkuch-redux´ can be up to 30 times slower in Ruby than Go. This is one of the reasons I was interested in embedding Go code in a Ruby environment.
For those who do not know how shared libraries operate, they work in a similar way as DLLs in Windows. However, they have a native code with a direct interface to the C compiler.
Note Windows uses the DLL system, and in this case, this does not necessarily have to be in native code.
One example is DLLs written in C#, which runs on a virtual machine. Because I do not use windows, I ended up not testing if it is poss
| #!/bin/bash | |
| # | |
| # Name: nft-flush | |
| # Auth: Gavin Lloyd <gavinhungry@gmail.com> | |
| # Date: 06 Mar 2014 | |
| # Desc: Flush and delete all nftables rules, chains and tables | |
| # | |
| NFT=/usr/bin/nft | |
| FAMILIES="ip ip6 arp bridge" |
| #!/bin/bash | |
| # rubygem is required | |
| # yard is required: gem install yard | |
| # doc_to_dash is required: gem install doc_to_dash | |
| GEM_NAME_PREFIX=$1 | |
| DOCSET_DIR=$2 | |
| TMP_DIR=$(mktemp -d) |
You can run your Express app very easily inside your Electron app.
All you need to do is to:
your_electron_app\resources\appapp.js file| package main | |
| import ( | |
| "code.google.com/p/go.crypto/ssh/terminal" | |
| "github.com/kr/pty" | |
| "io" | |
| "os" | |
| "os/exec" | |
| ) |
| ########################################################### | |
| # net/socket_http.rb | |
| ########################################################### | |
| module Net | |
| # Overrides the connect method to simply connect to a unix domain socket. | |
| class SocketHttp < HTTP | |
| attr_reader :socket_path | |
| # URI should be a relative URI giving the path on the HTTP server. |