Skip to content

Instantly share code, notes, and snippets.

View indatawetrust's full-sized avatar
🏠
Working from home

Ahmet Şimşek‎ indatawetrust

🏠
Working from home
View GitHub Profile
@indatawetrust
indatawetrust / web-push.js
Created January 9, 2019 09:36
web-push with nodejs
const OneSignal = require('onesignal-node');
const client = new OneSignal.Client({
app: {
appAuthKey: '*',
appId: '*',
},
});
const notification = new OneSignal.Notification({
#!/bin/bash
. $HOME/.nvm/nvm.sh
yarn build
SELECT t.term_id, t.name, t.slug
FROM wp_terms AS t
INNER JOIN wp_term_taxonomy AS tt ON (t.term_id = tt.term_id)
INNER JOIN wp_term_relationships AS tr ON (tr.term_taxonomy_id = tt.term_taxonomy_id)
WHERE tt.taxonomy IN ('course_category') AND tr.count > 0
ORDER BY t.name ASC
wget http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.3.1/swagger-codegen-cli-2.3.1.jar -O swagger-codegen-cli.jar
apt install default-jre
alias swagger="java -jar swagger-codegen-cli.jar"
const https = require('https');
https.get('https://ifconfig.co/json', resp => {
let data = '';
resp.on('data', chunk => {
data += chunk;
});
resp.on('end', () => {
@indatawetrust
indatawetrust / s.js
Last active November 12, 2018 17:02
string js
const string = require("string");
const s = (text, func, ...params) => string(text)[func](...params).s;
ffmpeg -loop 1 -i image1.jpg -c:v libx264 -t 1 -pix_fmt yuv420p -vf scale=320:240 out.mp4
ffmpeg -i out.mp4 -loop 1 -framerate 24 -t 1 -i image1.jpg -filter_complex "[0]scale=500:500,setsar=1[im];[1]scale=500:500,setsar=1[vid];[im][vid]concat=n=2:v=1:a=0" out.mp4
git clone https://github.com/creytiv/re.git
cd re
make
sudo make install
cd ..
git clone https://github.com/otalk/restund.git
cd restund
make
sudo make install
sudo apt-get remove docker docker-engine docker.io
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
// MarionetteJS (Backbone.Marionette)
// ----------------------------------
// v2.4.2
//
// Copyright (c)2015 Derick Bailey, Muted Solutions, LLC.
// Distributed under MIT license
//
// http://marionettejs.com
/*!
* Includes BabySitter