Skip to content

Instantly share code, notes, and snippets.

View arastu's full-sized avatar
🦀

Touhid Arastu arastu

🦀
View GitHub Profile
https://jsonplaceholder.typicode.com/photos?_page=1&_limit=20
https://reqres.in/api/login
https://www.sitepoint.com/react-router-v4-complete-guide/
# using:
# for set proxy:
# $ setproxy 127.0.0.1 8118
# for unset:
# $ unsetproxy
function setproxy() {
export {http,https,ftp,HTTP,HTTPS}_proxy=http://$1:$2
export no_proxy="localhost,127.0.0.1,master.cafecluster"
echo "Proxy variable(http,https,ftp) set to $1:$2"
@arastu
arastu / style.css
Last active October 21, 2017 19:08
.titr, .tpost a {
font-family: 'behdad', sans-serif !important;
}
html body .top {
background: url(http://up2www.com/uploads/1b82top-1-.jpg) no-repeat top;
}
@arastu
arastu / sorting_integers_with_two_stacks.js
Last active October 13, 2017 00:45
Sorting Integers with two stacks in javascript
function Stack() {
this.data = []
}
Stack.prototype.pop = function () {
return this.data.pop()
}
Stack.prototype.push = function (item) {
this.data.push(item)
}
/**
* Open https://app.snapp.ir
* Login with your credentials
* Copy and pasting this code in developer tools console
* Waiting... :)
*/
(async function () {
function sleep(ms = 0) {
return new Promise(r => setTimeout(r, ms));
}
{
{ 'A', ".-" },
{ 'B', "-..." },
{ 'C', "-.-." },
{ 'D', "-.." },
{ 'E', "." },
{ 'F', "..-." },
{ 'G', "--." },
{ 'H', "...." },
{ 'I', ".." },
@arastu
arastu / macos-http-proxy-func.sh
Last active May 7, 2017 16:43
Shell function to set, on or off http and https proxy
# add this function to .zshrc or .bashrc
# Example:
# Set http and https proxy:
# $ macsetproxy 127.0.0.1 8118
#
# Turn http and https proxy off
# $ macoffproxy
#
# Turn http and https proxy on
# $ maconproxy
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "go",
"request": "launch",
"mode": "exec",
"remotePath": "",
"port": 2345,
@arastu
arastu / lunch.json
Last active February 14, 2017 13:35
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "go",
"request": "launch",
"mode": "debug",
"remotePath": "",
"port": 2345,
brew install go-delve/delve/delve