Skip to content

Instantly share code, notes, and snippets.

View abdollahpour's full-sized avatar
😎
Let's microservice the world!

Hamed Abdollahpour abdollahpour

😎
Let's microservice the world!
View GitHub Profile
@abdollahpour
abdollahpour / README.md
Last active September 16, 2024 19:21
Install Knative on K3S

Install multipass

https://multipass.run/

Create virtual machine

multipass launch --mem 10G --cpus 6 --disk 20G --name knative
multipass shell knative

Install K3S

#!/bin/bash
#title :wildfly-install.sh
#description :The script to install Wildfly 8.x
#more :http://sukharevd.net/wildfly-8-installation.html
#author :Dmitriy Sukharev
#date :20141129
#usage :/bin/bash wildfly-install.sh
WILDFLY_VERSION=8.2.0.Final
WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION
@abdollahpour
abdollahpour / script.js
Last active August 29, 2015 14:06
Trim all the fields inside of the object by JQuery
var data = {
'padded-left': ' left',
'padded-righ': 'right '};
for(var d in data) data[d] = $.trim(data[d]);
console.log(data);
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
var data = {
@abdollahpour
abdollahpour / gist:6851651
Created October 6, 2013 09:26
Setup CentOS
Change DNS server:
/etc/sysconfig/network-scripts/ifcfg-eth0
@abdollahpour
abdollahpour / convert.php
Created September 25, 2013 14:57
Convert LESS to CSS with PHP
<?php
require "lessc.inc.php";
$css_file = 'test.css';
if(!file_exists($css_file)) {
$less_file = preg_replace('"\.css$"', '.less', $css_file);
$less = new lessc;
$less->checkedCompile($less_file, $css_file);
}
@abdollahpour
abdollahpour / Install last VLC
Created September 24, 2013 08:00
Ubuntu tips
$ sudo add-apt-repository ppa:videolan/master-daily
$ sudo apt-get update
$ sudo apt-get install vlc
@abdollahpour
abdollahpour / Capture by VLC
Created September 24, 2013 07:52
Video capture
cvlc v4l2:// :v4l2-width=640 :v4l2-height=480 --sout "#transcode{vcodec=mpeg4,acodec=mpga,vb=800,ab=128}:standard{access=file,dst=capture_5.avi}" --input-slave=alsa://hw:0,0
@abdollahpour
abdollahpour / Download Video
Last active December 23, 2015 15:39
Youtube tips
$ sudo add-apt-repository ppa:nilarimogard/webupd8
$ sudo apt-get update
$ sudo apt-get install youtube-dl
# We can directly update with
$ sudo youtube-dl -U
# Simply download
$ youtube-dl http://www.youtube.com/some_url
You want to simply convert any kind of video for android device:
ffmpeg -i <input> -s 480x320 -vcodec mpeg4 -acodec aac -strict -2 -ac 1 -ar 16000 -r 13 -ab 32000 -aspect 3:2 <output> ffmpeg -i <input> -s 480x320 -vcodec mpeg4 -acodec aac -strict -2 -ac 1 -ar 16000 -r 13 -ab 32000 -aspect 3:2 <output>