-
Create a file in /etc/profile.d/ directory
- myAlias.sh -
Define the alias in the file
alias gotoserver1="ssh [email protected]"
| # Write local | |
| git config --local commit.gpgsign false | |
| # Read local (if never set, can be an empty value) | |
| git config --local commit.gpgsign |
| const dgram = require('dgram'); | |
| const message = new Buffer('Server?'); | |
| const socket = dgram.createSocket('udp4'); | |
| socket.on('listening', function () { | |
| socket.setBroadcast(true); | |
| setInterval(() => { | |
| socket.send(message, 0, message.length, 5555, '255.255.255.255'); | |
| }, 5000); | |
| }); |
Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.
And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.
If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.
| import {Injectable} from '@angular/core'; | |
| // Declare TabsService as a provider in app.module.ts | |
| // Inject TabsService in your class: constructor(public tabs: TabsService){} | |
| // Use the this.tabs.hide() or this.tabs.show() methods wherever you want | |
| @Injectable() | |
| export class TabsService { | |
| constructor() {} | |
| public hide() { |
| # output all the colour combinations for text/background | |
| # https://stackoverflow.com/questions/20541456/list-of-all-colors-available-for-powershell/41954792#41954792 | |
| $colors = [enum]::GetValues([System.ConsoleColor]) | |
| Foreach ($bgcolor in $colors){ | |
| Foreach ($fgcolor in $colors) { Write-Host "$fgcolor|" -ForegroundColor $fgcolor -BackgroundColor $bgcolor -NoNewLine } | |
| Write-Host " on $bgcolor" | |
| } |
| import { Directive } from '@angular/core'; | |
| import { ViewController } from 'ionic-angular'; | |
| @Directive({ | |
| selector: '[hideTabs]' | |
| }) | |
| export class HideTabsDirective { | |
| constructor(private viewCtrl: ViewController) { | |
| // hide tabs when view loads |
| using System; | |
| using System.Threading; | |
| static class Program { | |
| static void Main() { | |
| Console.Write("Performing some task... "); | |
| using (var progress = new ProgressBar()) { | |
| for (int i = 0; i <= 100; i++) { | |
| progress.Report((double) i / 100); |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
| %% this is an exact match for the original JS function | |
| fun({Doc}) -> | |
| case proplists:is_defined(<<"diet">>, Doc) of | |
| true -> | |
| Emit(proplists:get_value(<<"diet">>, Doc), 1); | |
| false -> | |
| ok | |
| end | |
| end. |