Skip to content

Instantly share code, notes, and snippets.

View imolorhe's full-sized avatar
🕴️
Release!

Samuel imolorhe

🕴️
Release!
View GitHub Profile
@imolorhe
imolorhe / default.md
Created July 9, 2025 22:42 — forked from cablej/default.md
Cluely System prompt

<core_identity> You are an assistant called Cluely, developed and created by Cluely, whose sole purpose is to analyze and solve problems asked by the user or shown on the screen. Your responses must be specific, accurate, and actionable. </core_identity>

<general_guidelines>

  • NEVER use meta-phrases (e.g., "let me help you", "I can see that").
  • NEVER summarize unless explicitly requested.
  • NEVER provide unsolicited advice.
  • NEVER refer to "screenshot" or "image" - refer to it as "the screen" if needed.
  • ALWAYS be specific, detailed, and accurate.
@imolorhe
imolorhe / README.md
Last active November 9, 2020 06:06
My OneDark Pro inspired theme configuration for Altair.
1 << 2
4 << 1 // bitwise left shift operator
// d - 4
// b - 100
// >> n
// << n => 2 ^ n
/**
* @param {string} n
* @return {string}
*/
var nearestPalindromic = function(n) {
const nN = BigInt(n);
if (n == 11n) {
return "9";
}
const palindrome = getUniquePalindrome(n);
@imolorhe
imolorhe / electron-store-adapter.js
Last active October 11, 2019 06:47
Electron helpers
const ElectronStore = require('electron-store');
class ElectronStoreAdapter {
constructor() {
this.store = new ElectronStore();
}
/**
* Returns the number of key/value pairs currently present in the list associated with the object.
*/
@imolorhe
imolorhe / rpc.md
Created September 10, 2019 18:14 — forked from creationix/rpc.md
Simple RPC design

I've designed a lot of RPC protocols in my career. One pattern that's worked well basically goes as follows:

// Client calls: print('Hello World\n')
-> [1, "print", "Hello World!\n"]
// Server sends return value (or lack of return vvalue)
<- [-1]

// Client calls: add(1, 2)
-> [2, "add", 1, 2]

https://github.com/Siubaak/sval

import Sval from 'sval'

// Sval options
const options = {
  // ECMA Version of the code (5 | 6 | 7 | 8 | 9 | 10 | 2015 | 2016 | 2017 | 2018 | 2019)
  ecmaVer: 9,
 // Whether the code runs in a sandbox
import Amplify, { API, graphqlOperation } from "aws-amplify";
// import API from '@aws-amplify/api';
import awsconfig from './aws-exports';
Amplify.configure(awsconfig) // *not sure
API.configure(awsconfig);
// Subscribe to creation of Todo
const SubscribeToEventComments = `subscription subscribeToComments {
subscribeToComments {
it('should write the clipping text to the clipboard', async () => {
await app.client.waitUntilWindowLoaded();
await app.electron.clipboard.writeText('Vegan Ham');
await app.client.click('#copy-from-clipboard');
await app.electron.clipboard.writeText('Something different');
await app.client.click('.copy-clipping');
const clipboardText = await app.electron.clipboard.readText();
return assert.equal(clipboardText, 'Vegan Ham');
});