Skip to content

Instantly share code, notes, and snippets.

View kenOfYugen's full-sized avatar

Kyriakos-Ioannis D. Kyriakou kenOfYugen

View GitHub Profile
@jalbam
jalbam / unfollow-non-followers-twitter.js
Last active March 20, 2024 03:15
Code to stop following those ones who are not following you back on Twitter and keeping those you want or follow anyone you want, with certain filters (working in July 2019)
/*
Unfollow (stop following) those people who are not following you back on Twitter (or unfollow everyone if desired).
This will work for new Twitter web site code structure (it was changed from July 2019, causing other unfollow-scripts to stop working).
Instructions:
1) The code may need to be modified depending on the language of your Twitter web site:
* For English language web site, no modification needed.
* For Spanish language web site, remember to set the 'LANGUAGE' variable to "ES".
* For another language, remember to set the 'LANGUAGE' variable to that language and modify the 'WORDS' object to add the words in that language.
@kettanaito
kettanaito / client-App.jsx
Last active April 21, 2023 22:16
React - SSR (Server-side rendering)
// Root of the actual application.
// Feel free to branch from here, create routes and any other things
// rendered on both browser and server.
//
// Don't use modules relying on "window" here, as it would throw on the serfver.
// If using any such logic, move it to "client-index" instead, as its being rendered
// in the browser only.
import React from 'react'
const App = () => (
@nobojithalder
nobojithalder / License Sublime Text 3.2.2.md
Last active September 27, 2023 12:18
License for Sublime Text Version 3.2.2, Build 3211

If anyone's looking for a solution for licensing Sublime Text!

Here goes an easy tutorial on how to register, Sublime Text Version 3.2.2, Build 3211

  • Go to https://hexed.it/
  • Click on "Open file" and select "sublime_text.exe" executable file. [This 'sublime_text.exe' file should be located at C:\Program Files\Sublime Text 3]
  • Go to "Search" and in "Search for" field, search for "97 94 0D" and click "Search now" button.
  • One result will appear below, click on it.
// Suppose you have a variable named `future` which implements the `Future` trait.
let future: impl Future = ...;
// This gist demonstrates how to run the future until completion using the `stdweb` crate.
// The various imports.
extern crate futures;
extern crate stdweb;
@sebmarkbage
sebmarkbage / Infrastructure.js
Last active May 2, 2024 03:11
SynchronousAsync.js
let cache = new Map();
let pending = new Map();
function fetchTextSync(url) {
if (cache.has(url)) {
return cache.get(url);
}
if (pending.has(url)) {
throw pending.get(url);
}
#![feature(lang_items)]
#![no_std]
#[no_mangle]
pub fn add_one(x: i32) -> i32 {
x + 1
}
// needed for no_std
@bmhatfield
bmhatfield / .profile
Last active March 18, 2024 07:43
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@CMCDragonkai
CMCDragonkai / functions_and_closures.rs
Last active July 29, 2019 22:05
Rust: Higher Order Functions & Closures (Rust 1.7 Stable) - Creating the Haskell's `$` function in Rust.
fn main() {
let closure_immutable_pure = |x: i32| x + 1;
let result1 = apply_pure(& closure_immutable_pure, 1);
// let result2 = apply_mut(&mut closure_immutable_pure, 2); // not typeable
let result3 = apply_once(closure_immutable_pure, 3);
let mut closure_mutable_pure = |x: i32| x + 1;