Skip to content

Instantly share code, notes, and snippets.

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

Jose Angel Mendez Santiago JamsMendez

🏠
Working from home
View GitHub Profile
@KlassenKonstantin
KlassenKonstantin / RubberBandSlider.kt
Created January 15, 2024 17:16
Rubber Band Slider Compose
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
WindowCompat.setDecorFitsSystemWindows(window, false)
super.onCreate(savedInstanceState)
setContent {
RubberBandSliderTheme {
Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background) {
Box(contentAlignment = Alignment.Center) {
RubberBandSlider(modifier = Modifier
.height(200.dp)
@GiovanniGrieco
GiovanniGrieco / podman_on_wsl2.md
Last active July 15, 2024 15:10
Install Podman on WSL2

Install Podman on Windows Subsystem for Linux 2 (WSL2)

This guide allows a safe and rootless installation of Podman on WSL2. Head over the hyperlinks to discover more about these two wonderful technologies!

This guide assumes that Debian 11 "bullseye" is installed as WSL2 base OS. To do it, simply open your Windows Powershell console under Admin rights and run

PS> wsl install -d Debian

After installation, please check that you are under the latest Debian. If not, please upgrade it.

@gradosevic
gradosevic / gulpfile_react.js
Last active November 24, 2022 06:27
Working gulpfile.js with gulp-babel ES6 and React
var gulp = require('gulp');
var babel = require("gulp-babel");
var sourcemaps = require('gulp-sourcemaps');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
gulp.task('default', () => {
return gulp.src('js/main.js')
.pipe(sourcemaps.init())
.pipe(babel({
@himalay
himalay / auto-wall
Last active June 22, 2024 19:00
Sets random wallpaper every 30 minutes using feh(A lightweight and powerful image viewer).
#!/usr/bin/bash
img=(`find ~/pictures/wallpapers/ -name '*' -exec file {} \; | grep -o -P '^.+: \w+ image' | cut -d':' -f1`)
while true
do
feh --bg-scale "${img[$RANDOM % ${#img[@]} ]}"
sleep 30m
done
@mschoebel
mschoebel / main.go
Created March 6, 2014 20:02
Snippet: login/logout (Golang)
package main
import (
"fmt"
"github.com/gorilla/mux"
"github.com/gorilla/securecookie"
"net/http"
)
// cookie handling
@Maksims
Maksims / class.js
Last active January 19, 2017 18:18
Small implementation of classes with: extend, implement, and check methods
// base class
function Class() { }
// base class name
Class.prototype.className = 'Class';
// lists all parent classes and outputs JSON with it
Class.prototype.toString = function() {
var str = '';
var next = this.__proto__;
var sys = require('sys');
var express = require('express')
, passport = require('passport')
, util = require('util')
, TwitterStrategy = require('passport-twitter').Strategy
, RedisStore = require('connect-redis') (express);
var https = require('https');
var oauth = require('oauth').OAuth;
var TWITTER_CONSUMER_KEY = "LJgg";
var TWITTER_CONSUMER_SECRET = "0Q7vE";
@skrb
skrb / Test.java
Created April 8, 2012 02:04
JavaFX WebView Sample
import java.io.IOException;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class Test extends Application {