Skip to content

Instantly share code, notes, and snippets.

💉

Mehmet Burak Erman mburakerman

💉
View GitHub Profile
@mburakerman
mburakerman / rock-scissors-paper.py
Last active Jul 6, 2020
python rock-scissors-paper game
View rock-scissors-paper.py
import random
game = ["rock", "scissors", "paper"]
human_val = False
print("enter rock, scissors or paper")
while human_val == False:
human_val = input()
computer_val = random.choice(game)
@mburakerman
mburakerman / edabit-easy.py
Last active Jul 2, 2020
Edabit easy level python challenges
View edabit-easy.py
#1 create a function that takes a string and returns the number (count) of vowels contained within it.
def count_vowels(text):
output = 0
for letter in text:
if letter in "aeiou":
output += 1
print(output)
#count_vowels("python")
View todo.svelte
<script>
$: todos = [];
var todo = "";
function addTodoOnEnter(e) {
if (e.key === "Enter") {
addTodo();
}
}
function addTodo() {
@mburakerman
mburakerman / gulpfile.js
Last active Jun 14, 2019
gulp concat (join all js files into one file)
View gulpfile.js
var gulp = require("gulp");
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
gulp.task('scripts', function (done) {
gulp.src(['assets/js/jquery.js', 'assets/js/funds.js', 'assets/js/main.js'])
.pipe(concat('all.js'))
.pipe(uglify())
.pipe(gulp.dest('dist/'))
View line.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mburakerman
mburakerman / package.json
Last active Jun 12, 2019
Webpack 4 config.js (Stylus to CSS and Babel) 👌 The Simplest Usage 👌
View package.json
{
"name": "webpack-stylus",
"version": "1.0.0",
"scripts": {
"start": "webpack-dev-server --open --mode development",
"build": "webpack -p"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.4",
View loader.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mburakerman
mburakerman / package.json
Last active Apr 5, 2018
parcel bundler usage
View package.json
{
/* ..
.
*/
"scripts": {
"start": "parcel index.html",
"build": "parcel build index.html --public-url ./ --out-dir static"
}
/* ..
.
View .editorconfig
root = true
# for all languages
[*]
indent_style = space
indent_size = 2
# for javascript
[*.js]
indent_style = space
View line.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.