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
import 'dart:mirrors'; | |
class User { | |
final String email; | |
final String name; | |
const User({required this.email, required this.name}); | |
} | |
extension DeclarationMirrorExtension on DeclarationMirror { | |
/// Name of this object or field |
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
console.log("JamesPerihIsCool".replace(/(?<!^)(?=[A-Z])/g, ' ')); |
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
import * as React from 'react'; | |
import { KeypadKey } from './KeypadKey'; | |
import './styles.less'; | |
export interface IKeypadProps | |
{ | |
onKeyPressed: (keyPressed: KeypadKeys) => void; | |
} |
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
package main | |
import ( | |
"math" | |
"fmt" | |
) | |
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | |
//::: ::: | |
//::: This routine calculates the distance between two points (given the ::: |
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
Hi All! | |
I've recently launched a tool that wraps many of the commands here with a user interface. This desktop application is currently available for macOS. There's a roadmap outlining planned features for the near future. | |
Feel free to request any features you'd like to see, and I'll prioritize them accordingly. | |
One of the most important aspects of this application is that every command executed behind the scenes is displayed in a special log section. This allows you to see exactly what’s happening and learn from it. | |
Here's the link to the repository: https://github.com/Pulimet/ADBugger | |
App Description: | |
ADBugger is a desktop tool designed for debugging and QA of Android devices and emulators. It simplifies testing, debugging, and performance analysis by offering device management, automated testing, log analysis, and remote control capabilities. This ensures smooth app performance across various setups. |
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 node | |
// Channel ID is on the the browser URL.: https://mycompany.slack.com/messages/MYCHANNELID/ | |
// Pass it as a parameter: node ./delete-slack-messages.js CHANNEL_ID | |
// CONFIGURATION ####################################################################################################### | |
const token = 'SLACK TOKEN'; | |
// Legacy tokens are no more supported. | |
// Please create an app or use an existing Slack App |
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
library db.redis; | |
import 'dart:async'; | |
import 'package:redis_client/redis_client.dart'; | |
import 'package:connection_pool/connection_pool.dart'; | |
class Redis { | |
static Future<RedisClient> getRedis() async { | |
ManagedConnection managedConnection = await new RedisPool().getConnection(); |
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
/* | |
Split an array into chunks and return an array | |
of these chunks. | |
With kudos to github.com/JudeQuintana | |
This is an update example for code I originally wrote 5+ years ago before | |
JavaScript took over the world. | |
Extending native objects like this is now considered a bad practice, so use |
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
import 'dart:core'; | |
import 'dart:async'; | |
import 'dart:io'; | |
void startServer() { | |
Future<ServerSocket> serverFuture = ServerSocket.bind('0.0.0.0', 55555); | |
serverFuture.then((ServerSocket server) { | |
server.listen((Socket socket) { | |
socket.listen((List<int> data) { | |
String result = new String.fromCharCodes(data); |
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
function RemoveAccents(strAccents) { | |
var strAccents = strAccents.split(''); | |
var strAccentsOut = new Array(); | |
var strAccentsLen = strAccents.length; | |
var accents = 'ÀÁÂÃÄÅàáâãäåÒÓÔÕÕÖØòóôõöøÈÉÊËèéêëðÇçÐÌÍÎÏìíîïÙÚÛÜùúûüÑñŠšŸÿýŽž'; | |
var accentsOut = "AAAAAAaaaaaaOOOOOOOooooooEEEEeeeeeCcDIIIIiiiiUUUUuuuuNnSsYyyZz"; | |
for (var y = 0; y < strAccentsLen; y++) { | |
if (accents.indexOf(strAccents[y]) != -1) { | |
strAccentsOut[y] = accentsOut.substr(accents.indexOf(strAccents[y]), 1); | |
} else |
NewerOlder