Skip to content

Instantly share code, notes, and snippets.

@anubhavshrimal
anubhavshrimal / CountryCodes.json
Last active May 7, 2024 15:48 — forked from Goles/CountryCodes.json
Country and Dial or Phone codes in JSON format
[
{
"name": "Afghanistan",
"dial_code": "+93",
"code": "AF"
},
{
"name": "Aland Islands",
"dial_code": "+358",
"code": "AX"
@resistancecanyon
resistancecanyon / multipleImageContentReader.js
Last active May 7, 2024 15:48
Reading Multiple Image Base64 data using Es6 Async/Await in a html:type:file input
// html
// <input type="file" onchange="imagesSelected" multiple accept=".gif,.jpg,.jpeg,.png" />
async function imagesSelected(event) {
let files = [...event.target.files];
let images = await Promise.all(files.map(f=>{return readAsDataURL(f)}));
//all images' base64encoded data will be available as array in images
}
function readAsDataURL(file) {
@crisu83
crisu83 / Example.kt
Last active May 7, 2024 15:47
A predictable state container (like Redux) written in Kotlin for use with Android view models.
data class CounterUiState(val counter: Int = 0) : State
sealed class CounterAction : Action {
object Increment : CounterAction()
object Decrement : CounterAction()
data class SetValue(val value: Int) : CounterAction()
}
class CounterViewModel : ViewModel() {
@imami
imami / anydesk-enable-remote-access.md
Last active May 7, 2024 15:47
AnyDesk - How Enable Remote Access from ubuntu/debian terminal

###AnyDesk - How Enable Remote Access from ubuntu/debian terminal.

Note:

Here are the commands might be usefull in this purpose:

  • anydesk --get-status : To get current status of anydesk, which might be offlien,online or nothing.
  • anydesk --get-id : To get the ID that your system can be accessed by.
  • anydesk --service : To start anydesk service if not already running (for Linux).
  • anydesk --restart-service : To restart anydesk service
  • anydesk --stop-service : To stop anydesk service
@jason-chandler
jason-chandler / init.lisp
Last active May 7, 2024 15:44
Basic .lem/init.lisp showing some ugly workarounds for getting cxxxr/valtan to work along with paredit and the monokai theme
(in-package :lem-user)
;; beautiful monokai
(define-color-theme "monokai" ()
(:foreground "#eeeeee")
(:background "#262626")
(cursor :foreground "#262626" :background "#eeeeee")
(syntax-warning-attribute :foreground "#87005f" :background "#262626")
(syntax-string-attribute :foreground "#d7d787" :background "#262626")
(syntax-comment-attribute :foreground "#666666" :background "#262626")
The Yale VPN uses Cisco AnyConnect.
If Cisco's Linux client works for you, congratulations.
If, like me, the official client leaves you stranded, then you need to install
OpenConnect and (assuming you are using Network Manager) the appropriate add-on for the NM applet.
On a Debian-based system, you can type the following command:
$ sudo apt-get install openconnect network-manager-openconnect network-manager-openconnect-gnome
@ripperhe
ripperhe / README.md
Created October 28, 2022 05:02 — forked from IsaacXen/README.md
(Almost) Every WWDC videos download links for aria2c.
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 7, 2024 15:39
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@ChristopherDavenport
ChristopherDavenport / LRUCache.scala
Last active May 7, 2024 15:38
LRUCache Implementation
// import cats._
import cats.effect._
import cats.effect.concurrent.{Ref, Semaphore}
import cats.effect.implicits._
import cats.implicits._
import scala.concurrent.duration._
import scala.collection.immutable.Map
import io.chrisdavenport.mapref.MapRef
// import io.chrisdavenport.mapref.implicits._
@parsibox
parsibox / ip.sh
Created November 6, 2022 09:10
whatsapp and instagram ip list for microtik
/ip firewall address-list
add address=3.33.221.48/32 list=Meta
add address=3.33.252.61/32 list=Meta
add address=15.197.206.217/32 list=Meta
add address=15.197.210.208/32 list=Meta