I hereby claim:
- I am arastu on github.
- I am arastu (https://keybase.io/arastu) on keybase.
- I have a public key ASDTglyFyGlXVmDMsuusGrWei9GdBSrTBa3JSJ-Y5PN3HQo
To claim this, I am signing this object:
# Iran adlist | |
# source: https://raw.githubusercontent.com/farrokhi/adblock-iran/master/pihole.txt | |
0.0.0.0 1000click.ir | |
0.0.0.0 a.clickyab.com | |
0.0.0.0 ad-push.ir | |
0.0.0.0 ad.adtube.ir | |
0.0.0.0 ad.anetwork.ir | |
0.0.0.0 ad.cafebazaar.ir | |
0.0.0.0 ad.nowaroos.com | |
0.0.0.0 ad.utop.ir |
#!/bin/bash | |
# Get current status of a OpenFortiVPN connection with options to connect/disconnect. | |
# Commands that require admin permissions should be whitelisted with 'visudo', e.g.: | |
# YOURUSERNAME ALL=(ALL) NOPASSWD: /usr/local/bin/openfortivpn | |
# YOURUSERNAME ALL=(ALL) NOPASSWD: /usr/bin/killall -2 openfortivpn | |
# To use openfortivpn in an easy way you can create file like: /Documents/.fortivpn-config and put your crential in it as following: | |
# | |
# host=123.45.678.9 | |
# port=1234 |
$ brew list | |
==> Formulae | |
ali gnu-sed libogg mitmproxy recode | |
aom gnupg libpng mpdecimal rtmpdump | |
apr gnutls libpq mpfr rubberband | |
apr-util go libpthread-stubs mpv ruby | |
argon2 gobject-introspection librist msgpack sdl2 | |
asdf graphite2 librsvg mujs sheldon | |
aspell graphviz libsamplerate mutagen six | |
autoconf grep libsndfile ncurses snappy |
class Queue<T> { | |
private list: T[] = []; | |
private readonly capacity: number | null = null; | |
private tail = 0; | |
private head = 0; | |
constructor(capacity: number) { | |
this.capacity = Math.max(capacity, 0) || null; | |
if (this.capacity) { |
const http = require('http'); | |
function randomInt(min, max) { | |
min = Math.ceil(min); | |
max = Math.floor(max); | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
} | |
function randomIDGenerator(length) { |
# First of all you need install *libraqm* on your machin. | |
# The Raqm library encapsulates the logic for complex text layouts and provides a convenient API. | |
# libraqm relies on the following libraries: FreeType, HarfBuzz, FriBiDi, | |
# make sure that you install them before installing libraqm if not available as package in your system. | |
# if you using macos you can install libraqm with homebrew | |
# $> brew install libraqm | |
# Pillow wheels since version 8.2.0 include a modified version of libraqm |
import uuid | |
from django.db import models | |
# Use the import below instead, if using GeoDjango fields | |
# from django.contrib.gis.db import models | |
from django.utils.translation import ugettext_lazy as _ | |
from django.contrib.postgres.fields import ( | |
ArrayField, | |
CICharField, | |
CIEmailField, |
on escape_quotes(string_to_escape) | |
set AppleScript's text item delimiters to the "\"" | |
set the item_list to every text item of string_to_escape | |
set AppleScript's text item delimiters to the "\\\"" | |
set string_to_escape to the item_list as string | |
set AppleScript's text item delimiters to "" | |
return string_to_escape | |
end escape_quotes | |
tell application "Spotify" |
I hereby claim:
To claim this, I am signing this object:
-- Forked from: https://coderwall.com/p/fyfp0w/applescript-to-connect-bluetooth-headphones | |
activate application "SystemUIServer" | |
tell application "System Events" | |
tell process "SystemUIServer" | |
set btMenu to (menu bar item 1 of menu bar 1 whose description contains "bluetooth") | |
tell btMenu | |
click | |
tell (menu item "PUT_YOUR_AIRPODE_NAME_HERE" of menu 1) -- Touhid’s AirPods not Touhid's AirPods | |
click | |
if exists menu item "Connect" of menu 1 then |