Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Generate the script that converts all wav files inside the folder to ogg
for f in *.wav
do
echo "ffmpeg -i '$f' -c:a libvorbis -qscale:a 3 '$f.ogg'"
done
@aliustaoglu
aliustaoglu / appify
Created May 7, 2020 08:13 — forked from mathiasbynens/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh
@aliustaoglu
aliustaoglu / vue.config.js
Created April 5, 2020 06:10
Vue Webpack Sourcemap
module.exports = {
lintOnSave: false,
configureWebpack: config => {
if (process.env.NODE_ENV === 'development') {
config.devtool = 'eval-source-map';
config.output.devtoolModuleFilenameTemplate = info =>
info.resourcePath.match(/\.vue$/) && !info.identifier.match(/type=script/) // this is change ✨
? `webpack-generated:///${info.resourcePath}?${info.hash}`
: `webpack-yourCode:///${info.resourcePath}`;
@aliustaoglu
aliustaoglu / Javascript ISO country code to country name conversion
Created September 2, 2019 07:17 — forked from maephisto/Javascript ISO country code to country name conversion
ISO 3166-1 alpha-2 country code to country name conversion with a simple Javascript implementation, an array and a function.
var isoCountries = {
'AF' : 'Afghanistan',
'AX' : 'Aland Islands',
'AL' : 'Albania',
'DZ' : 'Algeria',
'AS' : 'American Samoa',
'AD' : 'Andorra',
'AO' : 'Angola',
'AI' : 'Anguilla',
'AQ' : 'Antarctica',
@aliustaoglu
aliustaoglu / docker-on-android.md
Created July 16, 2019 01:49 — forked from arno01/docker-on-android.md
Docker on Android

WORK IN PROGRESS

Docker on Android

Setup:

Samsung Galaxy Tab S5e SM-T720
Android Pie on Linux 4.9.112 (not rooted)
Termux
@aliustaoglu
aliustaoglu / cities.json
Created April 26, 2019 22:31 — forked from Miserlou/cities.json
1000 Largest US Cities By Population With Geographic Coordinates, in JSON
[
{
"city": "New York",
"growth_from_2000_to_2013": "4.8%",
"latitude": 40.7127837,
"longitude": -74.0059413,
"population": "8405837",
"rank": "1",
"state": "New York"
},
@aliustaoglu
aliustaoglu / launch.json
Created March 28, 2019 22:01
Debug Jest/Cucumber/Java with VSCode
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug Cucumber Tests",
"request": "launch",
@aliustaoglu
aliustaoglu / react-native-macos-package-scripts.json
Last active February 15, 2019 22:59
Scripts needed to run React-Native-Macos and solve problems when they happen
{
"start": "node node_modules/react-native-macos/local-cli/cli.js start",
"ios": "react-native run-ios",
"android": "react-native run-android",
"macos": "react-native-macos run-macos",
"test": "jest",
"bundle": "react-native-macos bundle --dev false --entry-file index.js --bundle-output ios/main.jsbundle --platform macos",
"debugger-open": "rndebugger-open --port 8081",
"watchman-clear": "watchman watch-del-all && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start -- --reset-cache",
"install-3rd-party": "cd node_modules/react-native-macos && scripts/macos-install-third-party.sh"
'use strict';
const nJwt = require('./njwt'); //https://www.npmjs.com/package/njwt
const signingKey = 'my super secret key';
exports.handler = function(event, context, callback) {
var token = event.authorizationToken || event.Authorization || event.token;
nJwt.verify(token, signingKey, function(err, verifiedJwt) {
if (err) {
@aliustaoglu
aliustaoglu / README.md
Created August 22, 2018 03:50
Watch webpack in production environment with create-react-app (react-scripts)

This configuration works with maven spring framework.

This requires react-app-rewired as dev dependency.

Build script stays as is, add a watch script that will trigger config-overrides using react-app-rewired and it will watch webpack.

{
"scripts": {
 "build": "react-scripts build",